Conflicting options are now prefixed #8

This commit is contained in:
Antonin Décimo
2014-08-23 11:44:29 +02:00
parent fc063815fb
commit fd4e0195a7
8 changed files with 49 additions and 45 deletions

View File

@@ -27,11 +27,11 @@ do
if [ "$OPTOPT" = "activity" ]; then
ACTIVITY=$OPTARG
activity_defined_argument=true
elif [ "$OPTOPT" = "package-version" ]; then
elif [ "$OPTOPT" = "apk-package-version" ]; then
PACKAGE_VERSION=$OPTARG
elif [ "$OPTOPT" = "maintainer-name" ]; then
elif [ "$OPTOPT" = "apk-maintainer-name" ]; then
MAINTAINER_NAME=$OPTARG
elif [ "$OPTOPT" = "package-name" ]; then
elif [ "$OPTOPT" = "apk-package-name" ]; then
PACKAGE_NAME=$OPTARG
package_name_defined_argument=true
elif [ "$OPTOPT" = "update-android" ]; then

View File

@@ -28,17 +28,17 @@ fi
package_name_defined_argument=false
while getoptex "$SCRIPT_ARGS" "$@"
do
if [ "$OPTOPT" = "package-version" ]; then
if [ "$OPTOPT" = "deb-package-version" ]; then
PACKAGE_VERSION=$OPTARG
elif [ "$OPTOPT" = "homepage" ]; then
PROJECT_HOMEPAGE=$OPTARG
elif [ "$OPTOPT" = "description" ]; then
PROJECT_DESCRIPTION=$OPTARG
elif [ "$OPTOPT" = "maintainer-name" ]; then
elif [ "$OPTOPT" = "deb-maintainer-name" ]; then
MAINTAINER_NAME=$OPTARG
elif [ "$OPTOPT" = "maintainer-email" ]; then
MAINTAINER_EMAIL=$OPTARG
elif [ "$OPTOPT" = "package-name" ]; then
elif [ "$OPTOPT" = "deb-package-name" ]; then
PACKAGE_NAME=$OPTARG
package_name_defined_argument=true
fi

View File

@@ -24,6 +24,7 @@
# - a semicolon ";" if it doesn't require an argument
# - a dot "." if it has an optional argument
# - a colon ":" if it requires an argument
# If you need options that might conflict by their names with already defined options, please prefix them.
SCRIPT_ARGS="q; wer: ty. uiop $SCRIPT_ARGS"
## 2. Add a short summary of your module

View File

@@ -16,9 +16,9 @@ fi
# Options
while getoptex "$SCRIPT_ARGS" "$@"
do
if [ "$OPTOPT" = "icon" ]; then
if [ "$OPTOPT" = "osx-icon" ]; then
PROJECT_ICNS=$OPTARG
elif [ "$OPTOPT" = "maintainer-name" ]; then
elif [ "$OPTOPT" = "osx-maintainer-name" ]; then
MAINTAINER_NAME=$OPTARG
fi
done

View File

@@ -15,7 +15,7 @@ fi
# Options
while getoptex "$SCRIPT_ARGS" "$@"
do
if [ "$OPTOPT" = "icon" ]; then
if [ "$OPTOPT" = "win-icon" ]; then
PROJECT_ICO=$OPTARG
fi
done