summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-06-12 13:31:37 (GMT)
committerFred Drake <fdrake@acm.org>2001-06-12 13:31:37 (GMT)
commit66a0a0a9b62a42c278d079bb3524a971a5fae494 (patch)
treef0a10a04b862a71ed0eb63bcdb69a1d3f3f65227
parent8c2133da7b1059404a3f6b8cc941dbbb6464a03f (diff)
downloadcpython-66a0a0a9b62a42c278d079bb3524a971a5fae494.zip
cpython-66a0a0a9b62a42c278d079bb3524a971a5fae494.tar.gz
cpython-66a0a0a9b62a42c278d079bb3524a971a5fae494.tar.bz2
Make the option processing more robust.
Add a -F option similar to "cvs commit -F <file>". Add a -t option to allow specifying the prefix to the directory into which the docs should be unpacked (useful when I start trying out new styles for the presentation).
-rwxr-xr-xDoc/tools/push-docs.sh38
1 files changed, 31 insertions, 7 deletions
diff --git a/Doc/tools/push-docs.sh b/Doc/tools/push-docs.sh
index ae721c6..822b7d7 100755
--- a/Doc/tools/push-docs.sh
+++ b/Doc/tools/push-docs.sh
@@ -19,12 +19,36 @@ fi
EXPLANATION=''
-if [ "$1" = '-m' ] ; then
- EXPLANATION="$2"
- shift 2
-elif [ "$1" ] ; then
- EXPLANATION="`cat $1`"
- shift 1
+while [ "$#" -gt 0 ] ; do
+ case "$1" in
+ -m)
+ EXPLANATION="$2"
+ shift 2
+ ;;
+ -t)
+ DOCTYPE="$2"
+ shift 2
+ ;;
+ -F)
+ EXPLANATION="`cat $2`"
+ shift 2
+ ;;
+ -*)
+ echo "Unknown option: $1" >&2
+ exit 2
+ ;;
+ *)
+ break
+ ;;
+ esac
+done
+if [ "$1" ] ; then
+ if [ "$EXPLANATION" ] ; then
+ echo "Explanation may only be given once!" >&2
+ exit 2
+ fi
+ EXPLANATION="$1"
+ shift
fi
START="`pwd`"
@@ -45,7 +69,7 @@ ssh python.sourceforge.net tmp/update-docs.sh $DOCTYPE $PACKAGE '&&' rm tmp/upda
Mail -s "[$DOCLABEL doc updates]" $ADDRESSES <<EOF
The development version of the documentation has been updated:
- http://python.sourceforge.net/$DOCTYPE-docs/
+ http://python.sourceforge.net/$DOCTYPE-docs/
$EXPLANATION
EOF