[PATCH 3/3] Simplify some tests

Cristian Ionescu-Idbohrn cristian.ionescu-idbohrn at axis.com
Wed Feb 8 09:03:49 PST 2017


Because `[ "$foo" != "" ] is equivalent to `[ "$foo" ]'
in all POSIX shells.

Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn at axis.com>
---
 packaging/android/android-build-wrapper.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/packaging/android/android-build-wrapper.sh b/packaging/android/android-build-wrapper.sh
index cd96f965..0d1e6913 100644
--- a/packaging/android/android-build-wrapper.sh
+++ b/packaging/android/android-build-wrapper.sh
@@ -49,7 +49,7 @@ for i in git cmake autoconf libtool java ant wget unzip; do
 			MISSING="${MISSING}${i} "
 		fi
 done
-if [ "$MISSING" != "" ] ; then
+if [ "$MISSING" ] ; then
 	echo "The following packages are missing: $MISSING"
 	echo "Please install via your package manager."
 	exit 1
@@ -132,7 +132,7 @@ fi
 rm -f ./subsurface-mobile-build-arm/bin/QtApp-debug.apk
 rm -d ./subsurface-mobile-build-arm/AndroidManifest.xml
 rm -d ./subsurface-mobile-build-arm/bin/AndroidManifest.xml
-if [ "$USE_X" != "" ] ; then
+if [ "$USE_X" ] ; then
 	bash "$USE_X" subsurface/packaging/android/build.sh "$RELEASE" -buildnr "$BUILDNR" arm "$@"
 else
 	bash subsurface/packaging/android/build.sh "$RELEASE" -buildnr "$BUILDNR" arm "$@"
-- 
2.11.0



More information about the subsurface mailing list