From aa0439502aa136770198c8a12f5a549197c4ecec Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Mon, 8 Apr 2002 23:17:26 +0000 Subject: Add --batch option and document all options on --help. --- localsyncthis | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'localsyncthis') diff --git a/localsyncthis b/localsyncthis index b6a725d..a3948be 100755 --- a/localsyncthis +++ b/localsyncthis @@ -18,18 +18,25 @@ while [ $# -gt 0 ]; do usage: $prg [] host [path [path...]] or: $prg [] \"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";; -- cgit v1.2.3