made rsync "official"
authorkleing
Thu, 09 Mar 2000 17:19:49 +0100
changeset 8396 16f6de8c897b
parent 8395 919307bebbef
child 8397 f2d371bde3c4
made rsync "official"
Admin/mirror-dist
Admin/mirror-isabelle-dist
--- a/Admin/mirror-dist	Thu Mar 09 16:14:37 2000 +0100
+++ b/Admin/mirror-dist	Thu Mar 09 17:19:49 2000 +0100
@@ -20,4 +20,4 @@
     ;;
 esac
 
-rsync -va --delete rsync://www4.in.tum.de:8730/isabelle-dist/. $DEST/.
+mirror-isabelle-dist -d $DEST
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Admin/mirror-isabelle-dist	Thu Mar 09 17:19:49 2000 +0100
@@ -0,0 +1,76 @@
+#!/bin/sh
+#
+# mirror script for isabelle distribution
+#
+# $Id$
+#
+
+
+
+## self references
+
+PRG=`basename "$0"`
+
+if [ -h "$0" ]; then
+  THIS=`cd \`dirname "$0"\`; cd \`dirname \\\`find "$0" -ls | cut -d ">" -f 2\\\`\`; pwd`
+else
+  THIS=`cd \`dirname "$0"\`; pwd`
+fi
+
+SUPER=`cd "$THIS/.."; pwd`
+
+
+## diagnostics
+
+usage()
+{
+  echo
+  echo "Usage: $PRG [OPTIONS] [DEST]"
+  echo
+  echo "  Options are:"
+  echo "    -n    dry run, don't do anything, just report what would happen"
+  echo "    -d    delete files that are not on the server"
+  echo
+  exit 1
+}
+
+fail()
+{
+  echo "$1" >&2
+  exit 2
+}
+
+
+## process command line
+
+# options
+
+ARGS=""
+
+while getopts "nd" OPT
+do
+  case "$OPT" in
+    n)
+      ARGS="$ARGS -n"
+      ;;
+    d)
+      ARGS="$ARGS --delete"
+      ;;
+    \?)
+      usage
+      ;;
+  esac
+done
+
+shift `expr $OPTIND - 1`
+
+
+# arguments
+
+[ $# -ne 1 ] && { echo "Bad arguments: $*"; usage; }
+
+DEST="$1"; shift;
+
+## main
+
+rsync -va $ARGS rsync://www4.in.tum.de/isabelle-dist/. $DEST/.
\ No newline at end of file