summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/reproducible_build.sh')
-rwxr-xr-xbin/reproducible_build.sh20
1 files changed, 18 insertions, 2 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index b9c878f0..4ffb6004 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -66,8 +66,24 @@ if [[ $1 =~ ^-?[0-9]+$ ]] ; then
sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO source_stats VALUES (\"sid\", \"${P_IN_SOURCES}\")"
rm $TMPFILE
else
- PACKAGES="$@"
- AMOUNT="${#@}"
+ # CANDIDATES is defined in that file
+ . /srv/jenkins/bin/reproducible-candidates.sh
+ PACKAGES=""
+ AMOUNT="10"
+ REAL_AMOUNT=0
+ for i in $(seq 0 ${#CANDIDATES[@]}) ; do
+ if [ $REAL_AMOUNT -eq $AMOUNT ] ; then
+ continue
+ fi
+ PKG=${CANDIDATES[$i]}
+ RESULT=$(sqlite3 ${PACKAGES_DB} "SELECT name FROM source_packages WHERE name = \"${PKG}\"")
+ if [ "$RESULT" = "" ] ; then
+ PACKAGES="${PACKAGES} $PKG"
+ let "REAL_AMOUNT=REAL_AMOUNT+1"
+ fi
+ done
+ AMOUNT=$REAL_AMOUNT
+
fi
echo "============================================================================="
echo "The following $AMOUNT source packages will be build: ${PACKAGES}"