Skip to content

Commit e69f60d

Browse files
committed
make options arg mandatory
1 parent a4d5626 commit e69f60d

File tree

4 files changed

+34
-22
lines changed

4 files changed

+34
-22
lines changed

build/android/build.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,7 @@ ANDROID_GCC_VERSION=4.8
1717
ANDROID_ARCH=arm
1818

1919
# TODO: configure to compile specify 3rd party libraries
20-
OPTIONS="
21-
--enable-lua
22-
--enable-freetype2
23-
--enable-png
24-
--enable-zlib
25-
"
20+
OPTIONS=""
2621

2722
usage()
2823
{
@@ -75,6 +70,13 @@ do
7570
esac
7671
done
7772

73+
if test -z "$OPTIONS"
74+
then
75+
echo "You must specify a OPTIONS parameter."
76+
usage
77+
exit 1
78+
fi
79+
7880
if [ "${ANDROID_ABI}" != "x86" ] && [ "${ANDROID_ABI}" != "armeabi-v7a" ] && [ "${ANDROID_ABI}" != "armeabi" ]; then
7981
echo "You must specify the right Android Arch within {armeabi, armeabi-v7a, x86}"
8082
exit 1

build/ios/build.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@ SDK_MIN=6.0
1010
ARCH=armv7
1111

1212
# TODO: configure to compile speficy 3rd party libraries
13-
OPTIONS="
14-
--enable-lua
15-
--enable-freetype2
16-
--enable-png
17-
"
13+
OPTIONS=""
1814

1915

2016
usage()
@@ -77,6 +73,13 @@ do
7773
esac
7874
done
7975

76+
if test -z "$OPTIONS"
77+
then
78+
echo "You must specify a OPTIONS parameter."
79+
usage
80+
exit 1
81+
fi
82+
8083
shift $(($OPTIND - 1))
8184

8285

build/mac/build.sh

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@ OSX_VERSION=$(xcodebuild -showsdks | grep macosx | sort | tail -n 1 | awk '{prin
1515
SDKROOT=`xcode-select -print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$OSX_VERSION.sdk
1616

1717
# TODO: configure to compile specify 3rd party libraries
18-
OPTIONS="
19-
--enable-lua
20-
--enable-freetype2
21-
--enable-png
22-
"
18+
OPTIONS=""
2319

2420
usage()
2521
{
@@ -64,7 +60,16 @@ do
6460
;;
6561
esac
6662
done
63+
64+
if test -z "$OPTIONS"
65+
then
66+
echo "You must specify a OPTIONS parameter."
67+
usage
68+
exit 1
69+
fi
70+
6771
shift $(($OPTIND - 1))
72+
6873
if [ "x$1" != "x" ]; then
6974
usage
7075
exit 1

build/tizen/build.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,7 @@ info()
1414

1515

1616
# TODO: configure to compile specify 3rd party libraries
17-
OPTIONS="
18-
--enable-lua
19-
--enable-freetype2
20-
--enable-png
21-
--enable-tiff
22-
"
17+
OPTIONS=""
2318

2419
usage()
2520
{
@@ -60,6 +55,13 @@ do
6055
esac
6156
done
6257

58+
if test -z "$OPTIONS"
59+
then
60+
echo "You must specify a OPTIONS parameter."
61+
usage
62+
exit 1
63+
fi
64+
6365
shift $(($OPTIND - 1))
6466
if [ "x$1" != "x" ]; then
6567
usage

0 commit comments

Comments
 (0)