help message;
Tue, 21 Mar 2000 15:23:33 +0100
changeset 8544 edaac961e181
parent 8543 f54926bded7b
child 8545 263a30b90c16
help message;
--- a/Admin/rsync-isabelle	Tue Mar 21 00:18:54 2000 +0100
+++ b/Admin/rsync-isabelle	Tue Mar 21 15:23:33 2000 +0100
@@ -12,9 +12,10 @@
-  echo "Usage: $PRG [OPTIONS] [DEST]"
+  echo "Usage: $PRG [OPTIONS] DEST"
   echo "  Options are:"
+  echo "    -h    print help message"
   echo "    -n    dry run, don't do anything, just report what would happen"
   echo "    -d    delete files that are not on the server (beware!)"
@@ -32,11 +33,15 @@
 # options
-while getopts "nd" OPT
+while getopts "hnd" OPT
   case "$OPT" in
+    h)
+      HELP=true
+      ;;
       ARGS="$ARGS -n"
@@ -52,6 +57,60 @@
 shift `expr $OPTIND - 1`
+# help
+if [ -n "$HELP" ]; then
+  cat <<EOF
+Mirroring the Isabelle Distribution
+The Munich site maintains an rsync server for the Isabelle
+distribution, including complete sources, binaries, and documentation.
+The rsync tool is very smart and efficient in mirroring large
+directory hierarchies.  See for more
+information.  The rsync-isabelle script provides a simple front-end
+for easy access to the Isabelle distribution.
+The script can be either run in conservative or clean-sweep mode.
+1) Basic mirroring works like this:
+  ./rsync-isabelle /foo/bar
+where /foo/bar refers to your local copy of the Isabelle distribution
+(the base directory has to exist already).  This operation is
+conservative in the sense that files are never deleted, thus garbage
+may accumulate over time as our master copy is changed.
+Avoiding garbage in your local copy requires some care.  Rsync
+provides a way to delete all additional local files that are absent in
+the master copy.  This provides an efficient way to purge large
+directory hierarchies, even unwillingly in case that a wrong
+destination is given!
+2a) This will invoke a safe dry-run of clean-sweep mirroring:
+  ./rsync-isabelle -dn /foo/bar
+where additions and deletions will be printed without any actual
+changes performed so far.
+2b) Exact mirroring with actual deletion of garbage may be performed
+like this:
+  ./rsync-isabelle -d /foo/bar
+After gaining some confidence in the workings of rsync-isabelle one
+would usually set up some automatic mirror scheme, e.g. a daily cron
+job run by the 'nobody' user.
+  exit 0
 # arguments
 [ $# -ne 1 ] && { echo "Bad arguments: $*"; usage; }