From bc1cdaa5bbc418e79d33e7a1dd38a5d3b12fb388 Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Sat, 21 Mar 2015 12:42:27 +0100 Subject: reproducible: build: use a safer function to generate the random string --- bin/reproducible_build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin') 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/ -- cgit v1.2.3-70-g09d2