diff options
author | Ting-Wei Lan <lantw44@gmail.com> | 2019-02-28 21:42:27 +0800 |
---|---|---|
committer | Ting-Wei Lan <lantw44@gmail.com> | 2019-02-28 21:42:27 +0800 |
commit | 4825588a5e74fba836b60bdf8f8a05bfd3f41f04 (patch) | |
tree | e3939c2a5b4b7376a1d696f4c82a2ded1d6a2582 | |
parent | 637ce024792d9ad570a581a48351d045f4b7fd44 (diff) | |
download | wspkg-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-x | build.sh | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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' |