diff options
author | Mihai Moldovan <ionic@ionic.de> | 2015-04-02 01:20:39 +0200 |
---|---|---|
committer | Mihai Moldovan <ionic@ionic.de> | 2015-04-02 01:20:39 +0200 |
commit | 9ff437544fb9b2a0619bf4f21bf85bdd8ef9d9b0 (patch) | |
tree | bfe9f927bc01789075a3ffc79673a9aadcc7858c /bin | |
parent | ac2f70e59befc349c1fd12084bc2b4782860741f (diff) | |
download | buildscripts-9ff437544fb9b2a0619bf4f21bf85bdd8ef9d9b0.tar.gz buildscripts-9ff437544fb9b2a0619bf4f21bf85bdd8ef9d9b0.tar.bz2 buildscripts-9ff437544fb9b2a0619bf4f21bf85bdd8ef9d9b0.zip |
bin/build-rpm-package: use make_boolean more often, use more quoting.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/build-rpm-package | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/build-rpm-package b/bin/build-rpm-package index 947f108..0fda18c 100755 --- a/bin/build-rpm-package +++ b/bin/build-rpm-package @@ -882,8 +882,10 @@ delay_build() { set_vars "$@" && { if [ "x$(basename $0)" = "x$PREFIX-build-rpm-package" ] || [ "x$(basename $0)" = "x$PREFIX-build+upload-rpm-package" ]; then # Treat any value other than "no" and "0" as true. - cd $PROJECT_DIR && pkgneedsbuild $CHECKOUT || ( [ "x$FORCE_BUILD" != "xno" ] && [ "x$FORCE_BUILD" != "x0" ] ) && { - if [ "x$FORCE_BUILD" != "xno" ] && [ "x$FORCE_BUILD" != "x0" ] && ( [ "x$NO_DELAY" = "xno" ] || [ "x$NO_DELAY" = "x0" ] ); then + FORCE_BUILD="$(make_boolean "${FORCE_BUILD}")" + NO_DELAY="$(make_boolean "${NO_DELAY}")" + cd $PROJECT_DIR && { pkgneedsbuild $CHECKOUT || [ "${FORCE_BUILD}" -eq "1" ] } && { + if [ "${FORCE_BUILD}" -eq "1" ] && [ "${NO_DELAY}" -eq "0" ]; then delay_build fi lock_workspace @@ -895,7 +897,7 @@ set_vars "$@" && { unlock_workspace } fi - if [ "x$(basename $0)" = "x$PREFIX-upload-rpm-package" ] || [ "x$(basename $0)" = "x$PREFIX-build+upload-rpm-package" ]; then + if [ "x$(basename $0)" = "x${PREFIX}-upload-rpm-package" ] || [ "x$(basename $0)" = "x${PREFIX}-build+upload-rpm-package" ]; then upload_packages fi } |