diff --git a/bldpkg b/bldpkg index e50332c..59c4524 100755 --- a/bldpkg +++ b/bldpkg @@ -12,7 +12,7 @@ SRCDIR="$PWD" SRCDIRRPATH="$(basename $SRCDIR)" # verify checksums -verify() { +verifychecksums() { if [ -z "$SHA512SUMS" ] ; then echo "sha512 checksums don't exist in $SRCDIRRPATH.SMBuild !" echo "Please run bldpkg genchecksum" @@ -303,7 +303,7 @@ fi # source $1 #fi -verify +verifychecksums #build 2>&1 | tee -a "$APP".SMBuild.log.txt build diff --git a/bldpkg.d/verifychecksums b/bldpkg.d/verifychecksums new file mode 100755 index 0000000..f001b6f --- /dev/null +++ b/bldpkg.d/verifychecksums @@ -0,0 +1,19 @@ +# verify checksums +verifychecksums() { + if [ -z "$SHA512SUMS" ] ; then + echo "sha512 checksums don't exist in $SRCDIRRPATH.SMBuild !" + echo "Please run bldpkg genchecksum" + exit 1 + fi + + eval sums=\"\$SHA512SUMS\" + + echo "Verifying Checksums..." + IFS=$'\n' + for src in $sums; do + echo "$src" | sha512sum -c + done + unset IFS + echo "Looks good..." +} +