From 2a0b3f33325ee1e30005e9f039a30eb7de621688 Mon Sep 17 00:00:00 2001 From: Francis Rowe Date: Mon, 08 Jun 2015 07:48:52 -0400 Subject: build/release/sha512sums: only create sums in ${versiondir}/ --- (limited to 'resources/scripts/helpers/build/release/sha512sums') diff --git a/resources/scripts/helpers/build/release/sha512sums b/resources/scripts/helpers/build/release/sha512sums index 8bb1c26..ef02413 100755 --- a/resources/scripts/helpers/build/release/sha512sums +++ b/resources/scripts/helpers/build/release/sha512sums @@ -19,11 +19,22 @@ # along with this program. If not, see . # -# create sha512sum manifest -cd release/ -printf "Creating manifest of SHA512 sums in sha512sum.txt...\n" -for file in $(find -type f); do sha512sum $file >> sha512sum.txt; done +version="$(git describe --tags HEAD)" +versiondir="release/${version}" + +if [ ! -d "${versiondir}/" ]; then + + printf "build/release/sha512sums: directory %s/ does not exist. You haven't generated any archives yet.\n" "${versiondir}" + exit 1 + +fi + +# delete the old file +rm -f "${versiondir}/sha512sum.txt" + +# create sha512sum file +printf "Creating list of SHA512 sums in %s/sha512sum.txt...\n" "${versiondir}" +(cd "${versiondir}/" && for file in $(find -type f); do sha512sum $file >> sha512sum.txt; done) printf "...done.\n" -cd ../ printf "\n" -- cgit v0.9.1