summaryrefslogtreecommitdiff
path: root/bin/build-rpm-package
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2013-11-30 02:53:15 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2013-11-30 02:53:15 +0100
commit79f8ded19dc8d0b33a4a2377b399d650cb8560e5 (patch)
tree8cbb0197cdc5af8f2fb1bf9c5e10b4c2e536c813 /bin/build-rpm-package
parente8bc1d1c0ce82fca2c8b37abd9434f3733b7e310 (diff)
downloadbuildscripts-79f8ded19dc8d0b33a4a2377b399d650cb8560e5.tar.gz
buildscripts-79f8ded19dc8d0b33a4a2377b399d650cb8560e5.tar.bz2
buildscripts-79f8ded19dc8d0b33a4a2377b399d650cb8560e5.zip
make FORCE_BUILD usable from outside the script
Diffstat (limited to 'bin/build-rpm-package')
-rwxr-xr-xbin/build-rpm-package6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/build-rpm-package b/bin/build-rpm-package
index c38617c..a87e152 100755
--- a/bin/build-rpm-package
+++ b/bin/build-rpm-package
@@ -41,6 +41,8 @@ REPOS_SERVER="packages.mydomain.org"
PACKAGES_WITHOUT_OTHERMIRROR="keyring"
GNUPGHOME=$HOME/.gnupg
+FORCE_BUILD=${FORCE_BUILD:-"no"}
+
test -z $1 && { echo "usage: $(basename $0) [<subpath>/]<git-project> {main,main/<codename>,nightly,nightly/<codename>} [<git-checkout>]"; exit -1; }
PREFIX=$(echo `basename $0` | cut -d"-" -f1)
@@ -63,7 +65,7 @@ set_vars() {
ARGV2_CODENAME="$(echo "$2/" | cut -d"/" -f2)"
COMPONENT="${ARGV2_COMPONENT:-${COMPONENT:-$COMPONENT_NIGHTLY}}"
CODENAMES="${ARGV2_CODENAME:-${CODENAMES}}"
- [ -n "$ARGV2_CODENAME" ] && FORCE_BUILD=0 || FORCE_BUILD=-1
+ [ -n "$ARGV2_CODENAME" ] && FORCE_BUILD="yes" || true
DATE="${DATE:-$(date +%Y%m%d)}"
if [ "x$COMPONENT" = "x$COMPONENT_MAIN" ]; then
CHECKOUT="${3:-build-main}"
@@ -266,7 +268,7 @@ upload_packages() {
### MAIN ###
set_vars $@ && {
if [ "x$(basename $0)" = "x$PREFIX-build-rpm-package" ] || [ "x$(basename $0)" = "x$PREFIX-build+upload-rpm-package" ]; then
- cd $PROJECT_DIR && pkgneedsbuild $CHECKOUT || [ "$FORCE_BUILD" -eq 0 ] && {
+ cd $PROJECT_DIR && pkgneedsbuild $CHECKOUT || [ "$FORCE_BUILD" = "yes" ] && {
prepare_workspace && {
clear_pkgdist
build_packages