From 512aadece9634604744f95103a53961c31b1b625 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Wed, 19 Apr 2017 13:11:14 +0200 Subject: reproducible Debian: use sort to find latest entry Signed-off-by: Holger Levsen --- bin/reproducible_build_service.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/reproducible_build_service.sh b/bin/reproducible_build_service.sh index 29a57595..018d9e9c 100755 --- a/bin/reproducible_build_service.sh +++ b/bin/reproducible_build_service.sh @@ -19,7 +19,7 @@ set -x /bin/sleep $(echo "scale=1 ; $(shuf -i 1-230 -n 1)/10" | bc ) BUILD_BASE=/var/lib/jenkins/userContent/reproducible/debian/build_service/$1 -OLD_ID=$(ls -1rt $BUILD_BASE|grep -v latest|tail -1) +OLD_ID=$(ls -1rt $BUILD_BASE|grep -v latest|sort -n|tail -1) let BUILD_ID=OLD_ID+1 mkdir -p $BUILD_BASE/$BUILD_ID (cd $BUILD_BASE ; ln -sf $BUILD_ID latest) -- cgit v1.2.3-70-g09d2