diff -r bf4f2c1b26cc -r e9e341bc7d42 Admin/isasync --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Admin/isasync Tue Sep 27 15:30:37 2005 +0200 @@ -0,0 +1,131 @@ +#!/usr/bin/env bash +# +# $Id$ +# +# mirror script for Isabelle distribution or website + + +## diagnostics + +PRG=`basename "$0"` + +usage() +{ + echo + echo "Usage: $PRG [OPTIONS] DEST" + echo + echo " Options are:" + echo " -h print help message" + echo " -n dry run, don't do anything, just report what would happen" + echo " -w mirror whole Isabelle website" + echo " -d delete files that are not on the server (BEWARE!)" + echo + exit 1 +} + +fail() +{ + echo "$1" >&2 + exit 2 +} + + +## process command line + +# options + +HELP="" +ARGS="" +SRC="isabelle-distribution" + +while getopts "hnwd" OPT +do + case "$OPT" in + h) + HELP=true + ;; + n) + ARGS="$ARGS -n" + ;; + w) + SRC="isabelle-website" + ;; + d) + ARGS="$ARGS --delete" + ;; + \?) + usage + ;; + esac +done + +shift `expr $OPTIND - 1` + + +# help + +if [ -n "$HELP" ]; then + cat <