summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2014-09-28 00:13:02 +0200
committerHolger Levsen <holger@layer-acht.org>2014-09-28 00:13:02 +0200
commiteaeb2ae53ab3636686d409d7ef37b0b2c83d94a7 (patch)
tree682f6157ebfcfadee49ce4a19709370c926bdbeb /bin
parent2d7dd8558983a7253b1ee649a62a2c15d4294356 (diff)
downloadjenkins.debian.net-eaeb2ae53ab3636686d409d7ef37b0b2c83d94a7.tar.xz
reproducible: new job to build 50 random packages per day
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_build.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 7861078b..c4df8396 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -25,13 +25,24 @@ set -x
grep deb-src /etc/apt/sources.list | grep sid
sudo apt-get update
+# if $1 is an integer, build $1 random packages
+if [[ $1 =~ ^-?[0-9]+$ ]] ; then
+ TMPFILE=$(mktemp)
+ curl http://ftp.de.debian.org/debian/dists/sid/main/source/Sources.xz > $TMPFILE
+ AMOUNT=$1
+ PACKAGES=$(xzcat $TMPFILE | grep "^Package" | cut -d " " -f2 | sort -R | head -$AMOUNT | xargs echo)
+ rm $TMPFILE
+else
+ PACKAGES="$@"
+fi
+
COUNT_TOTAL=0
COUNT_GOOD=0
COUNT_BAD=0
GOOD=""
BAD=""
SOURCELESS=""
-for SRCPACKAGE in "$@" ; do
+for SRCPACKAGE in $PACKAGES ; do
let "COUNT_TOTAL=COUNT_TOTAL+1"
rm b1 b2 -rf
set +e