mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-20 13:50:12 +01:00
run-tests: properly handle zero and multiple args
The test for the help flag threw an error if there were 0 args, or if arg 1 was set to a space-separated list. The -z tests would fail if the arg was set to a space-separated list.
This commit is contained in:
parent
49b343d024
commit
14cd835929
@ -46,19 +46,19 @@ create_test_file() {
|
|||||||
#------------------------------------------------------------------------------#
|
#------------------------------------------------------------------------------#
|
||||||
# "main"
|
# "main"
|
||||||
|
|
||||||
if [ $1 = "-h" ] || [ $1 = "--help" ]; then
|
if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
|
||||||
set +x
|
set +x
|
||||||
echo "Usage: $0 '/path/to/folder/with/apks'"
|
echo "Usage: $0 '/path/to/folder/with/apks'"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z $ANDROID_HOME ]; then
|
if [ -z "$ANDROID_HOME" ]; then
|
||||||
echo "ANDROID_HOME must be set with the path to the Android SDK, i.e.: "
|
echo "ANDROID_HOME must be set with the path to the Android SDK, i.e.: "
|
||||||
echo " export ANDROID_HOME=/opt/android-sdk"
|
echo " export ANDROID_HOME=/opt/android-sdk"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z $1 ]; then
|
if [ -z "$1" ]; then
|
||||||
APKDIR=`pwd`
|
APKDIR=`pwd`
|
||||||
else
|
else
|
||||||
APKDIR=$1
|
APKDIR=$1
|
||||||
|
Loading…
Reference in New Issue
Block a user