manjaro-tools/bin/signiso.in

28 lines
619 B
Text
Raw Normal View History

2017-10-23 23:44:37 +02:00
#!/bin/bash
LIBDIR='/usr/lib/manjaro-tools'
[[ -r ${LIBDIR}/util-msg.sh ]] && source ${LIBDIR}/util-msg.sh
import ${LIBDIR}/util.sh
2018-04-15 17:02:39 +02:00
[[ ! -z "$1" ]] && cd "$1"
2017-10-23 23:44:37 +02:00
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