summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_schedule_on_demand.sh
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2014-10-14 10:49:13 +0200
committerHolger Levsen <holger@layer-acht.org>2014-10-14 10:49:13 +0200
commitd45b58ffbf1251467162cd5eacde5833bd244f82 (patch)
tree1138b29fe58433ee80db230ce2b7068a03b5f7ba /bin/reproducible_schedule_on_demand.sh
parente2d089042ed30b1043c30fce62a53dac729a541e (diff)
downloadjenkins.debian.net-d45b58ffbf1251467162cd5eacde5833bd244f82.tar.xz
reproducible: refactor
Diffstat (limited to 'bin/reproducible_schedule_on_demand.sh')
-rwxr-xr-xbin/reproducible_schedule_on_demand.sh21
1 files changed, 3 insertions, 18 deletions
diff --git a/bin/reproducible_schedule_on_demand.sh b/bin/reproducible_schedule_on_demand.sh
index dea11680..a407d1b5 100755
--- a/bin/reproducible_schedule_on_demand.sh
+++ b/bin/reproducible_schedule_on_demand.sh
@@ -6,24 +6,8 @@
. /srv/jenkins/bin/common-functions.sh
common_init "$@"
-set +x
-
-#
-# define db
-#
-PACKAGES_DB=/var/lib/jenkins/reproducible.db
-INIT=/var/lib/jenkins/reproducible.init
-if [ ! -f $PACKAGES_DB ] ; then
- echo "$PACKAGES_DB doesn't exist, no builds possible."
- exit 1
-elif [ -f $PACKAGES_DB.lock ] ; then
- for i in $(seq 0 100) ; do
- sleep 15
- [ -f $PACKAGES_DB.lock ] || break
- done
- echo "$PACKAGES_DB.lock still exist, exiting."
- exit 1
-fi
+# common code defining db access
+. /srv/jenkins/bin/reproducible_common.sh
schedule_packages() {
DATE="2014-10-01 00:23"
@@ -56,6 +40,7 @@ check_candidates() {
#
# main
#
+set +x
CANDIDATES="$@"
check_candidates
if [ $#{PACKAGES} -gt 256 ] ; then