summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-03-21 12:42:27 +0100
committerHolger Levsen <holger@layer-acht.org>2015-03-21 12:51:44 +0100
commitbc1cdaa5bbc418e79d33e7a1dd38a5d3b12fb388 (patch)
tree873da631a5a59e76bc8f5f3005b3facf3bf6231d
parent0a51922611b862e9bd34afcc15c3404181f82eb5 (diff)
downloadjenkins.debian.net-bc1cdaa5bbc418e79d33e7a1dd38a5d3b12fb388.tar.xz
reproducible: build: use a safer function to generate the random string
-rwxr-xr-xbin/reproducible_build.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index ff950a44..d1713e49 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -26,7 +26,7 @@ create_results_dirs() {
cleanup_all() {
set -x
if [ "$SAVE_ARTIFACTS" = "1" ] ; then
- local random=$(tr -cd '[:alnum:]' < /dev/urandom | fold -w5 | head -1)
+ local random=$(tr -cd '[:alnum:]' < /dev/urandom | head -c5 ; echo)
local ARTIFACTS="artifacts/r00t-me/tmp-${random}/${SUITE}/${SRCPACKAGE}"
mkdir -p /var/lib/jenkins/userContent/$ARTIFACTS
cp -rv $TMPDIR/* /var/lib/jenkins/userContent/$ARTIFACTS/