diff options
Diffstat (limited to 'localsyncthis')
-rwxr-xr-x | localsyncthis | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/localsyncthis b/localsyncthis index b6a725d..a3948be 100755 --- a/localsyncthis +++ b/localsyncthis @@ -18,18 +18,25 @@ while [ $# -gt 0 ]; do usage: $prg [<options>] host [path [path...]] or: $prg [<options>] \"host [host...]\" [path [path...]] -where options are the following: +and options are the following: + --download Make local directory equal to the remote one + --upload Make remote directory equal to the local one + --test Simulate, don't actually change anything + --dry-run (Alias for --test) + --force Always copy whole files (disable rsync feature) + --whole-file (Alias for --force) -v|--verbose Verbose mode - --host Hostname(s) of remote host(s) + --host Hostname(s) of remote host(s) -l|--localdir Local base directory (only if path specified) -r|--remotedir Remote base directory - -p|--port ssh port number - --ssh-opts Arbitrary ssh options - -h|--help This help text - -* Arbitrary rsync options + -p|--port ssh port number + -b|--batch Enable BatchMode (for use in automatic scripts) + --ssh-opts Arbitrary ssh options + -h|--help This help text + -* Arbitrary rsync options ---upload mirrors from local dir to remote dir. ---download does the opposite. +One of either --download or --upload is required. Last occurence +supersedes earlier ones. If no path specified, current working directory is used." exit 0 ;; @@ -42,6 +49,7 @@ If no path specified, current working directory is used." -l|--localdir) localdir="$2"; shift;; -r|--remotedir) remotedir="$2"; shift;; -p|--port) ssh_opts="$ssh_opts -p $2"; shift;; + -b|--batch) ssh_opts="$ssh_opts -o BatchMode=yes";; --ssh-opts) ssh_opts="$ssh_opts $2"; shift;; -*) rsync_opts="$rsync_opts $1";; *) args="$args $1";; |