]> granicus.if.org Git - python/commitdiff
Use getopt where possible, so this supports option letters that get
authorFred Drake <fdrake@acm.org>
Thu, 17 Jun 2004 22:04:17 +0000 (22:04 +0000)
committerFred Drake <fdrake@acm.org>
Thu, 17 Jun 2004 22:04:17 +0000 (22:04 +0000)
jammed together on thos platforms.

Doc/tools/push-docs.sh

index 294254a2bd959a69f2bf7d5b341b3a797a014d4a..c124f8b5da6f97cf67b13119b0b1f7e48afbac9b 100755 (executable)
@@ -29,7 +29,16 @@ fi
 EXPLANATION=''
 ANNOUNCE=true
 
-# XXX Should use getopt(1) here.
+getopt -T >/dev/null
+if [ $? -eq 4 ] ; then
+    # We have a sufficiently useful getopt(1) implementation.
+    set -- `getopt -ssh m:p:qt:F: "$@"`
+else
+    # This version of getopt doesn't support quoting of long options
+    # with spaces, so let's not rely on it at all.
+    :
+fi
+
 while [ "$#" -gt 0 ] ; do
   case "$1" in
       -m)