Mercurial > hg > paul
view bin/toE @ 0:2aa53823fb21
new repo
| author | Henry S. Thompson <ht@inf.ed.ac.uk> |
|---|---|
| date | Sat, 06 Jun 2026 10:19:04 +0100 |
| parents | |
| children |
line wrap: on
line source
#!/bin/bash # If one arg't, send to home dir of Edinburgh desktop machine # If more than one, send all but last to last, which must be a directory (or . for $HOME) # To rename remote file do toE local -r remote [dir] if [ "x$2" = "x" ]; then : else dir=${!#} set -- "${@: 1: $#-1}" if [ "$dir" = "." ]; then unset dir fi fi echo xcp "$@" "$DESKTOP:$dir" xcp "$@" "$DESKTOP:$dir" exit 0 # Older version follows ff= if [ "x$2" = "x" ] then dest="$DESKTOP:" ff="'$1'" else while [ "x$2" != "x" ] do ff="$ff '$1'" shift done dest="'$DESKTOP:$1'" fi echo scp $ff $dest sh -c "scp $ff $dest"
