From 495eb3ebdc3c76fec773495ada8d4b473214aaf4 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sun, 23 Nov 2014 16:12:22 +0100 Subject: refactor --- bin/reproducible_common.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh index f90cd7fe..37fc6943 100755 --- a/bin/reproducible_common.sh +++ b/bin/reproducible_common.sh @@ -10,16 +10,16 @@ PACKAGES_DB=/var/lib/jenkins/reproducible.db INIT=/var/lib/jenkins/reproducible.init if [ -f $PACKAGES_DB ] && [ -f $INIT ] ; then - if [ -f $PACKAGES_DB.lock ] ; then + if [ -f ${PACKAGES_DB}.lock ] ; then for i in $(seq 0 100) ; do sleep 15 echo "sleeping 15s, $PACKAGES_DB is locked." - if [ ! -f $PACKAGES_DB.lock ] ; then + if [ ! -f ${PACKAGES_DB}.lock ] ; then break fi done - if [ -f $PACKAGES_DB.lock ] ; then - echo "$PACKAGES_DB.lock still exist, exiting." + if [ -f ${PACKAGES_DB}.lock ] ; then + echo "${PACKAGES_DB}.lock still exist, exiting." exit 1 fi fi @@ -95,7 +95,7 @@ elif [ ! -f ${PACKAGES_DB} ] ; then done_randomness INTEGER, PRIMARY KEY (datum))' # 60 seconds timeout when trying to get a lock - cat >/var/lib/jenkins/reproducible.init <<-EOF + cat > $INIT <<-EOF .timeout 60000 EOF fi -- cgit v1.2.3-70-g09d2