Work even if build/ dir doesn't exist

This commit is contained in:
Duke Leto
2022-01-25 23:09:15 -05:00
parent 5a3de32fbd
commit 6f707342ea

View File

@@ -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