dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles # fast
git clone https://src.adamsgaard.dk/dotfiles.git # slow
Log | Files | Refs | README | LICENSE Back to index

commit 9b2557e9ed3c8705b8080180f8cbc68a519e1bf0
parent a045fff03cce59fa5056ca2a3d4846d897df5b06
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Sat, 27 Mar 2021 19:31:53 +0100

cloud: allow reading sh(1) scripts from stdin or file

Diffstat:
A.local/bin/cloud | 10++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)

diff --git a/.local/bin/cloud b/.local/bin/cloud @@ -0,0 +1,10 @@ +#!/bin/sh +host=adamsgaard.dk + +if test $# -eq 0; then + cat | ssh "$host" sh /dev/stdin +elif test -r "$1"; then + ssh "$host" sh /dev/stdin <"$1" +else + ssh "$host" "eval $*" +fi