3 # mirror script for Isabelle distribution
15 echo "Usage: $PRG [OPTIONS] DEST"
18 echo " -h print help message"
19 echo " -n dry run, don't do anything, just report what would happen"
20 echo " -d delete files that are not on the server (BEWARE!)"
32 ## process command line
39 while getopts "hnd" OPT
57 shift `expr $OPTIND - 1`
62 if [ -n "$HELP" ]; then
65 Mirroring the Isabelle Distribution
66 ===================================
68 The Munich site maintains an rsync server for the Isabelle
69 distribution, including complete sources, binaries, and documentation.
71 The rsync tool is very smart and efficient in mirroring large
72 directory hierarchies. See http://rsync.samba.org/ for more
73 information. The rsync-isabelle script provides a simple front-end
74 for easy access to the Isabelle distribution.
76 The script can be either run in conservative or clean-sweep mode.
78 1) Basic mirroring works like this:
80 ./rsync-isabelle /foo/bar
82 where /foo/bar refers to your local copy of the Isabelle distribution
83 (the base directory has to exist already). This operation is
84 conservative in the sense that files are never deleted, thus garbage
85 may accumulate over time as our master copy is changed.
87 Avoiding garbage in your local copy requires some care. Rsync
88 provides a way to delete all additional local files that are absent in
89 the master copy. This provides an efficient way to purge large
90 directory hierarchies, even unwillingly in case that a wrong
93 2a) This will invoke a safe dry-run of clean-sweep mirroring:
95 ./rsync-isabelle -dn /foo/bar
97 where additions and deletions will be printed without any actual
98 changes performed so far.
100 2b) Exact mirroring with actual deletion of garbage may be performed
103 ./rsync-isabelle -d /foo/bar
106 After gaining some confidence in the workings of rsync-isabelle one
107 would usually set up some automatic mirror scheme, e.g. a daily cron
108 job run by the 'nobody' user.
117 [ $# -ne 1 ] && { echo "Bad arguments: $*"; usage; }
124 exec rsync -va $ARGS rsync://www4.in.tum.de/isabelle-dist/. "$DEST/."