From 38a3bd9979b55b2e0483d3c8a0c67c7b4426425c Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Mon, 16 Mar 2015 13:26:30 +0100 Subject: reproducible: refactor --- bin/reproducible_schedule_on_demand.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'bin/reproducible_schedule_on_demand.sh') diff --git a/bin/reproducible_schedule_on_demand.sh b/bin/reproducible_schedule_on_demand.sh index ef953cf7..0be89415 100755 --- a/bin/reproducible_schedule_on_demand.sh +++ b/bin/reproducible_schedule_on_demand.sh @@ -16,11 +16,13 @@ schedule_packages() { # so schedule them in the past, so they are picked earlier :) DATE="2014-10-01 00:23" TMPFILE=$(mktemp) - for PKG in $PACKAGES ; do - echo "REPLACE INTO schedule (package_id, date_scheduled, date_build_started) VALUES ('$PKG', '$DATE', '');" >> $TMPFILE + for PKG_ID in $@ ; do + echo "REPLACE INTO schedule (package_id, date_scheduled, date_build_started) VALUES ('$PKG_ID', '$DATE', '');" >> $TMPFILE done cat $TMPFILE | sqlite3 -init $INIT ${PACKAGES_DB} rm $TMPFILE + cd /srv/jenkins/bin + python3 -c "from reproducible_html_indexes import build_page; build_page('scheduled')" } check_candidates() { @@ -68,9 +70,7 @@ fi MESSAGE="$TOTAL $PACKAGES_TXT $ACTION for $SUITE: ${PACKAGES_NAMES:0:256}$BLABLABLA" # finally -schedule_packages -cd /srv/jenkins/bin -python3 -c "from reproducible_html_indexes import build_page; build_page('scheduled')" +schedule_packages $PACKAGES echo echo "$MESSAGE" if [ -z "${BUILD_URL:-}" ] ; then -- cgit v1.2.3-54-g00ecf