diff options
| author | mjwybrow <mjwybrow@users.sourceforge.net> | 2007-03-15 05:26:38 +0000 |
|---|---|---|
| committer | mjwybrow <mjwybrow@users.sourceforge.net> | 2007-03-15 05:26:38 +0000 |
| commit | 78ad4579a5a37d539fc0c6d601b584fb1136ab67 (patch) | |
| tree | 3740d342519297910b9ba9c63bb2250aa25639db /packaging | |
| parent | * Info.plist.in: Update the Mac OS X copyright date to 2007. (diff) | |
| download | inkscape-78ad4579a5a37d539fc0c6d601b584fb1136ab67.tar.gz inkscape-78ad4579a5a37d539fc0c6d601b584fb1136ab67.zip | |
* packaging/macosx/osx-app.sh: Improve the comand line option processing.
(bzr r2658)
Diffstat (limited to 'packaging')
| -rwxr-xr-x | packaging/macosx/osx-app.sh | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/packaging/macosx/osx-app.sh b/packaging/macosx/osx-app.sh index cdd4359cc..6fc9980c6 100755 --- a/packaging/macosx/osx-app.sh +++ b/packaging/macosx/osx-app.sh @@ -71,27 +71,29 @@ fi pkg=Inkscape package="$pkg.app" -# TODO: Rewrite handling of command line args and make more robust. strip=false -if [ "$1" = "-s" ]; then - strip=true - shift -fi +while getopts 's' flag; do + case $flag in + s) strip=true ;; + \?) echo "Invalid command line option."; exit 1 ;; + *) echo "Internal error in getopts."; exit 2 ;; + esac +done +shift `expr $OPTIND - 1`; + binary="$1" if [ ! -x "$binary" ]; then echo "Not executable: $binary" >&2 exit 1 fi -shift -plist="$1" +plist="$2" if [ ! -f "$plist" ]; then echo "Need plist file" >&2 exit 1 fi -shift # Set the 'macosx' directory, usually the current directory. resdir=`pwd` |
