Merge branch 'maint'
[platform/upstream/automake.git] / lib / py-compile
index 140536b..6916903 100755 (executable)
@@ -3,8 +3,7 @@
 
 scriptversion=2011-06-08.12; # UTC
 
-# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2008, 2009, 2011 Free
-# Software Foundation, Inc.
+# Copyright (C) 2000-2012 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -37,13 +36,12 @@ me=py-compile
 usage_error ()
 {
   echo "$me: $*" >&2
-  echo "Try \`$me --help' for more information." >&2
+  echo "Try '$me --help' for more information." >&2
   exit 1
 }
 
 basedir=
 destdir=
-files=
 while test $# -ne 0; do
   case "$1" in
     --basedir)
@@ -62,7 +60,7 @@ while test $# -ne 0; do
       fi
       shift
       ;;
-    -h|--h*)
+    -h|--help)
       cat <<\EOF
 Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..."
 
@@ -78,17 +76,25 @@ Report bugs to <bug-automake@gnu.org>.
 EOF
       exit $?
       ;;
-    -v|--v*)
+    -v|--version)
       echo "$me $scriptversion"
       exit $?
       ;;
+    --)
+      shift
+      break
+      ;;
+    -*)
+      usage_error "unrecognized option '$1'"
+      ;;
     *)
-      files="$files $1"
+      break
       ;;
   esac
   shift
 done
 
+files=$*
 if test -z "$files"; then
     usage_error "no files given"
 fi