From 6f707342eab06f45444a4b647f2f376f34e092d3 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 25 Jan 2022 23:09:15 -0500 Subject: [PATCH] Work even if build/ dir doesn't exist --- contrib/devtools/gen-linux-binary-release.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/contrib/devtools/gen-linux-binary-release.sh b/contrib/devtools/gen-linux-binary-release.sh index bcd34e7f3..cd4cec2b7 100755 --- a/contrib/devtools/gen-linux-binary-release.sh +++ b/contrib/devtools/gen-linux-binary-release.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Released under the GPLv3 set -e @@ -11,8 +11,13 @@ VERSION=$(./src/hushd --version|grep version|cut -d' ' -f4|cut -d- -f1|sed 's/v/ FILE="hush-$VERSION-linux-amd64.tar" TIME=$(perl -e 'print time') -mv build build.$TIME +if [ -d "build" ] +then + mv build build.$TIME + echo "Moved existing build/ dir to build.$TIME" +fi mkdir build +echo "Created new build/ dir" cp contrib/asmap/asmap.dat build/ cp sapling*.params build/ cd src