summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTing-Wei Lan <lantw44@gmail.com>2019-02-28 21:42:27 +0800
committerTing-Wei Lan <lantw44@gmail.com>2019-02-28 21:42:27 +0800
commit4825588a5e74fba836b60bdf8f8a05bfd3f41f04 (patch)
treee3939c2a5b4b7376a1d696f4c82a2ded1d6a2582
parent637ce024792d9ad570a581a48351d045f4b7fd44 (diff)
downloadwspkg-data-4825588a5e74fba836b60bdf8f8a05bfd3f41f04.tar.gz
wspkg-data-4825588a5e74fba836b60bdf8f8a05bfd3f41f04.tar.zst
wspkg-data-4825588a5e74fba836b60bdf8f8a05bfd3f41f04.zip
Use ${var} instead of $var when referencing user-defined variables
-rwxr-xr-xbuild.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/build.sh b/build.sh
index 8368f7d..4e2be4d 100755
--- a/build.sh
+++ b/build.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-if [ -z "$WSPKGDIR" ]; then
+if [ -z "${WSPKGDIR}" ]; then
printf '\033[1;31mWSPKGDIR is not defined so I cannot build package for you :(\033[m\n'
if [ -f "../wspkg/wspkg-mk/packages.mk" ]; then
printf 'You may want to try WSPKGDIR="%s/wspkg" %s\n' "$(dirname "$(pwd)")" "$0"
@@ -23,12 +23,12 @@ fi
shift
: "${MAKE:="make"}"
-printf '\033[1;33mRunning\033[m: %s -f "%s" WSPKGDIR="%s"' "${MAKE}" "$makefile" "$WSPKGDIR"
+printf '\033[1;33mRunning\033[m: %s -f "%s" WSPKGDIR="%s"' "${MAKE}" "${makefile}" "${WSPKGDIR}"
for arg in "$@"; do
- printf ' %s' "$arg"
+ printf ' %s' "${arg}"
done
printf '\n\n'
-if "${MAKE}" -f "$makefile" WSPKGDIR="$WSPKGDIR" "$@"; then
+if "${MAKE}" -f "${makefile}" WSPKGDIR="${WSPKGDIR}" "$@"; then
printf '\n\033[1;32mDone! ;-)\033[m\n'
else
printf '\n\033[1;31mSorry... :(\033[m\n'