summaryrefslogtreecommitdiff
path: root/py-compile
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2017-07-12 08:38:46 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2017-07-12 08:38:49 +0900
commit44cf7615f8b29c5a41b4f8232f423683bebf2111 (patch)
treeece73f6c09298f08f4094605725943cfc481da81 /py-compile
parent6261b351b73e062a1d9b5f8bddc73b093c6f02a3 (diff)
downloadpygobject2-44cf7615f8b29c5a41b4f8232f423683bebf2111.tar.gz
pygobject2-44cf7615f8b29c5a41b4f8232f423683bebf2111.tar.bz2
pygobject2-44cf7615f8b29c5a41b4f8232f423683bebf2111.zip
Imported Upstream version 3.1.92
Change-Id: I4e7700a820e7e7508b52bfc52cf5c9e8f440fee7 Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'py-compile')
-rwxr-xr-xpy-compile51
1 files changed, 33 insertions, 18 deletions
diff --git a/py-compile b/py-compile
index 3f9d05b..15c834c 100755
--- a/py-compile
+++ b/py-compile
@@ -1,10 +1,10 @@
#!/bin/sh
# py-compile - Compile a Python program
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2011-06-08.12; # UTC
-# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2008, 2009 Free Software
-# Foundation, Inc.
+# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2008, 2009, 2011 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
@@ -32,28 +32,36 @@ if [ -z "$PYTHON" ]; then
PYTHON=python
fi
+me=py-compile
+
+usage_error ()
+{
+ echo "$me: $*" >&2
+ echo "Try \`$me --help' for more information." >&2
+ exit 1
+}
+
basedir=
destdir=
-files=
while test $# -ne 0; do
case "$1" in
--basedir)
- basedir=$2
- if test -z "$basedir"; then
- echo "$0: Missing argument to --basedir." 1>&2
- exit 1
+ if test $# -lt 2; then
+ usage_error "option '--basedir' requires an argument"
+ else
+ basedir=$2
fi
shift
;;
--destdir)
- destdir=$2
- if test -z "$destdir"; then
- echo "$0: Missing argument to --destdir." 1>&2
- exit 1
+ if test $# -lt 2; then
+ usage_error "option '--destdir' requires an argument"
+ else
+ destdir=$2
fi
shift
;;
- -h|--h*)
+ -h|--help)
cat <<\EOF
Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..."
@@ -69,20 +77,27 @@ Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
- -v|--v*)
- echo "py-compile $scriptversion"
+ -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
- echo "$0: No files given. Try \`$0 --help' for more information." 1>&2
- exit 1
+ usage_error "no files given"
fi
# if basedir was given, then it should be prepended to filenames before