summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2002-04-08 23:17:26 +0000
committerJonas Smedegaard <dr@jones.dk>2002-04-08 23:17:26 +0000
commitaa0439502aa136770198c8a12f5a549197c4ecec (patch)
treee3783bb275c721a1acb3f438d6f09b5b55ee1fbd
parenta20a738f722b1e44aeb9e379e017f1f9fa1f0125 (diff)
Add --batch option and document all options on --help.
-rwxr-xr-xlocalsyncthis24
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";;