From: Benjamin Drung Date: Wed, 19 Nov 2014 15:20:56 +0000 (+0100) Subject: extract_storage_kernel+modules.sh: Fix sources.list entry for experimental X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=bd4e904a7a55b09ae42cf0d770dcdeee695a9789;p=profitbricks%2Fjenkins-build-scripts.git extract_storage_kernel+modules.sh: Fix sources.list entry for experimental Also get rid of the $PB_SUITE variable (use $DISTRIBUTION instead) --- diff --git a/extract_storage_kernel+modules.sh b/extract_storage_kernel+modules.sh index 85119d6..50fb424 100755 --- a/extract_storage_kernel+modules.sh +++ b/extract_storage_kernel+modules.sh @@ -11,8 +11,11 @@ export # Define default settings # export DIST=squeeze -export PB_SUITE=$DISTRIBUTION export TARGET_BASE=/srv/storage-kernels +if test -z "$DISTRIBUTION"; then + echo "$0: Environment variable \$DISTRIBUTION not set or empty." >&2 + exit 1 +fi # get the last build number of the given target, # parsing tarball's file name under /srv/storage-kernels/. @@ -33,9 +36,6 @@ function get_last_target_build_no() { echo $retval } -# overwrite PB_SUITE with branch name -export PB_SUITE=$(echo $GIT_BRANCH_NAME | tr '/' '-' | sed -e "s/^\(feature\|bugfix\|poc\)-/dev-\1-/g") - case $DISTRIBUTION in production-proposed-updates) export TARGET_NAME=master @@ -52,7 +52,7 @@ case $DISTRIBUTION in " ;; experimental|dev_feature*) - [ -n "$PB_SUITE" ] && export TARGET_NAME=$(echo $PB_SUITE | sed 's/^dev_feature_/squeeze-feature-/') || export TARGET_NAME="experimental" + TARGET_NAME=$(echo $DISTRIBUTION | sed 's/^dev_feature_/squeeze-feature-/') LAST_DEVELOP_BUILD_NO=$(get_last_target_build_no develop) BUILD_NUMBER="$LAST_DEVELOP_BUILD_NO.$(printf %03d $BUILD_NUMBER)"