diff --git a/Makefile b/Makefile index 62a34ac..0ba3674 100644 --- a/Makefile +++ b/Makefile @@ -54,7 +54,8 @@ LIST_ISO = \ BIN_ISO = \ bin/buildiso \ bin/testiso \ - bin/deployiso + bin/deployiso \ + bin/signiso LIBS_ISO = \ $(wildcard lib/util-iso*.sh) \ diff --git a/bin/signiso.in b/bin/signiso.in new file mode 100644 index 0000000..f9b4466 --- /dev/null +++ b/bin/signiso.in @@ -0,0 +1,25 @@ +#!/bin/bash + +LIBDIR='/usr/lib/manjaro-tools' + +[[ -r ${LIBDIR}/util-msg.sh ]] && source ${LIBDIR}/util-msg.sh + +import ${LIBDIR}/util.sh + +for f in $(find . -maxdepth 1 -name '*.iso' | cut -d'/' -f2); do + if [[ ! -e $f.sha256 ]]; then + create_chksums $f + elif [[ $f -nt $f.sha256 ]]; then + create_chksums $f + else + info "checksums for [$f] already created" + fi + if [[ ! -e $f.sig ]]; then + signfile $f + elif [[ $f -nt $f.sig ]]; then + rm $f.sig + signfile $f + else + info "signature file for [$f] already created" + fi +done