libreboot

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 2a0b3f33325ee1e30005e9f039a30eb7de621688
parent 5c6c9806f35878215e11b26c7e6d56357363778b
Author: Francis Rowe <info@gluglug.org.uk>
Date:   Mon,  8 Jun 2015 12:48:52 +0100

build/release/sha512sums: only create sums in ${versiondir}/

Diffstat:
resources/scripts/helpers/build/release/sha512sums | 21++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)

diff --git 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"