diff options
author | Francis Rowe <info@gluglug.org.uk> | 2015-06-08 12:48:52 +0100 |
---|---|---|
committer | Francis Rowe <info@gluglug.org.uk> | 2015-06-08 12:48:52 +0100 |
commit | 2a0b3f33325ee1e30005e9f039a30eb7de621688 (patch) | |
tree | 6e638138abc62f32e5daab75eb7cfef709ef18bc /resources | |
parent | 5c6c9806f35878215e11b26c7e6d56357363778b (diff) | |
download | librebootfr-2a0b3f33325ee1e30005e9f039a30eb7de621688.tar.gz librebootfr-2a0b3f33325ee1e30005e9f039a30eb7de621688.zip |
build/release/sha512sums: only create sums in ${versiondir}/
Diffstat (limited to 'resources')
-rwxr-xr-x | resources/scripts/helpers/build/release/sha512sums | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/resources/scripts/helpers/build/release/sha512sums b/resources/scripts/helpers/build/release/sha512sums index 8bb1c261..ef02413c 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 <http://www.gnu.org/licenses/>. # -# 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" |