add signiso

This commit is contained in:
Bernhard Landauer 2017-07-04 22:08:20 +02:00
parent c529601087
commit 382a20f5a8
2 changed files with 27 additions and 1 deletions

View file

@ -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) \

25
bin/signiso.in Normal file
View file

@ -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