From a3abe928018b57ef1ce84a51381841a3f6a0e937 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Sun, 23 Oct 2016 16:49:00 -0400 Subject: [PATCH] build-package.sh: Fix -D argument handling --- build-package.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build-package.sh b/build-package.sh index 408ee9b01..e6f253d46 100755 --- a/build-package.sh +++ b/build-package.sh @@ -23,13 +23,13 @@ test -f $HOME/.termuxrc && . $HOME/.termuxrc # Handle command-line arguments: show_usage () { echo "Usage: ./build-package.sh [-a ARCH] [-d] [-D] PACKAGE" - echo "Build a package." - echo "Use -d for debug build." - echo "-D for disabled package." - echo "" + echo "Build a package by creating a .deb file in the debs/ folder." + echo " -a The architecture to build for: aarch64(default), arm, i686, x86_64 or all." + echo " -d Build with debug symbols." + echo " -D Build a disabled package in disabled-packages/." exit 1 } -while getopts :a:h:d:D option +while getopts :a:hd:D option do case "$option" in a) TERMUX_ARCH="$OPTARG";; @@ -63,7 +63,7 @@ if [[ $1 == *"/"* ]]; then export TERMUX_PKG_BUILDER_DIR=`realpath $1` else # Package name: - if [ -n $TERMUX_IS_DISABLED ]; then + if [ -n "$TERMUX_IS_DISABLED" ]; then export TERMUX_PKG_BUILDER_DIR=$TERMUX_SCRIPTDIR/disabled-packages/$TERMUX_PKG_NAME else export TERMUX_PKG_BUILDER_DIR=$TERMUX_SCRIPTDIR/packages/$TERMUX_PKG_NAME