From e8eb43fc308acb3f1a8ebada7633c097e5050e46 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Sun, 25 Apr 1999 15:43:45 +0000 Subject: Initial revision --- Functions/Zftp/zfput | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Functions/Zftp/zfput (limited to 'Functions/Zftp/zfput') diff --git a/Functions/Zftp/zfput b/Functions/Zftp/zfput new file mode 100644 index 000000000..0687163f0 --- /dev/null +++ b/Functions/Zftp/zfput @@ -0,0 +1,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 +# } -- cgit 1.4.1