From 382a20f5a801eac0711fd81687dcbec842cdc7d5 Mon Sep 17 00:00:00 2001 From: Bernhard Landauer Date: Tue, 4 Jul 2017 22:08:20 +0200 Subject: [PATCH] add signiso --- Makefile | 3 ++- bin/signiso.in | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 bin/signiso.in 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