diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2008-09-20 15:56:24 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2008-09-20 15:56:24 +0200 |
commit | 28c50ffb22edeece40b2c6adab52050e91b767bd (patch) | |
tree | 8fe8567af56ac251cba9663eaa744c2d3470d3f9 /etc | |
parent | bae3c15416812aa72be20094d22c33753f9d6b87 (diff) |
put: Accept paths, too
Diffstat (limited to 'etc')
-rw-r--r-- | etc/functions/put | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/functions/put b/etc/functions/put index 70a3ec9..89d0bd3 100644 --- a/etc/functions/put +++ b/etc/functions/put @@ -23,14 +23,14 @@ function put_sievert () { hosts=(aneurysm sievert) if [[ -f $1 ]] { - file=${1:t} + file=$1 while (( $#hosts )) { put_$hosts[1] ping -c 1 $hostname &> /dev/null if (( ? == 0 )) { scp $ssh_options $file $hostname:$target_dir - ssh $ssh_options $hostname "chmod 644 $target_dir$file" - echo $server_prefix$file + ssh $ssh_options $hostname "chmod 644 $target_dir${file:t}" + echo $server_prefix${file:t} return 0 } else { shift hosts |