4 # rpush-into [-c|--continue|-f|--force] FILE REMOTE_PREFIX ssh SSH_args..
6 # rpush-into [-c|--continue|-f|--force] FILE REMOTE_PREFIX eval
9 # will try not to overwrite files on the remote side unless -f is specified.
10 # With -c, if a files exists, this script will continue the transfer by appending.
12 # REMOTE_PREFIX can be a directory (terminated with /!),
13 # or another prefix that will prepended to FILE to get
14 # the path to the destination file on the remote end.
16 # It can be an empty string (''):
17 # then--obviously--FILE will be put into the remote home directory
18 # (or rather the current directory after connection to the remote end).
20 # "ssh" and "eval" are just examples; any valid bash command
21 # which interpretes arguments in the same way as "eval" will do.
23 # Licensed to all under AGPL as published by FSF.
24 # Copyright (C) 2012 by Ivan Zakharyaschev imz at altlinux.org
30 rpush
"$@" || rpush-continue
"$@"
51 RPUSH
"$FILE" "$REMOTE_PREFIX$(basename "$FILE")" "$@"