about summary refs log tree commit diff
path: root/Functions/Zftp/zfput
blob: 0687163f08266dd56d967f2eda82ecb491e4cdbc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# function zfput {
# Simple put:  dump every file under the same name, but stripping
# off any directory parts to get the remote filename (i.e. always
# goes into current remote directory).  Use zfpcp to specify new
# file name or new directory at remote end.

emulate -L zsh

local loc rem
integer stat do_close

zfautocheck

for loc in $*; do
  rem=${loc:t}
  zftp put $rem <$loc
  [[ $? == 0 ]] || stat=$?
done

(( $do_close )) && zfclose

return $stat
# }