diff --git a/bin/deployiso.in b/bin/deployiso.in
index fd49ee0..e40d5af 100644
--- a/bin/deployiso.in
+++ b/bin/deployiso.in
@@ -43,6 +43,7 @@ display_settings(){
msg "ARGS:"
msg2 "update: %s" "${update}"
msg2 "verbose: %s" "${verbose}"
+ msg2 "signiso: %s" "${sign}"
msg2 "torrent: %s" "${torrent}"
if ${torrent}; then
@@ -72,6 +73,7 @@ pretend=false
torrent=false
update=false
verbose=false
+sign=false
rsync_args=(-aPc --progress -e ssh)
@@ -82,6 +84,7 @@ usage() {
echo " -l Limit bandwidth in kB/s [default:${limit}]"
echo " -p Source folder to upload [default:${build_list_iso}]"
echo ' -q Query settings and pretend upload'
+ echo ' -s Sign ISO and create checksums'
echo ' -t Create iso torrent'
echo ' -u Update remote directory'
echo ' -v Verbose output'
@@ -90,7 +93,7 @@ usage() {
exit $1
}
-opts='dhl:p:qtuv'
+opts='dhl:p:qstuv'
while getopts "${opts}" arg; do
case "${arg}" in
@@ -98,6 +101,7 @@ while getopts "${opts}" arg; do
l) limit="$OPTARG"; rsync_args+=(--bwlimit=${limit}) ;;
p) build_list_iso="$OPTARG" ;;
q) pretend=true; rsync_args+=(-n) ;;
+ s) sign=true ;;
t) torrent=true ;;
u) update=true; rsync_args+=(-u) ;;
v) verbose=true; rsync_args+=(-v --stats) ;;
diff --git a/bin/signiso.in b/bin/signiso.in
index f9b4466..b85e4dd 100644
--- a/bin/signiso.in
+++ b/bin/signiso.in
@@ -6,6 +6,8 @@ LIBDIR='/usr/lib/manjaro-tools'
import ${LIBDIR}/util.sh
+[[ ! -z "$1" ]] && cd "$1"
+
for f in $(find . -maxdepth 1 -name '*.iso' | cut -d'/' -f2); do
if [[ ! -e $f.sha256 ]]; then
create_chksums $f
diff --git a/docbook/deployiso.xml b/docbook/deployiso.xml
index 0034f43..27e9fcb 100644
--- a/docbook/deployiso.xml
+++ b/docbook/deployiso.xml
@@ -101,6 +101,12 @@ along with systemd; If not, see .
Query settings and pretend upload.
+
+
+
+ Sign ISO and create checksums before uploading.
+
+
diff --git a/lib/util-publish.sh b/lib/util-publish.sh
index d7f6730..0d2796f 100644
--- a/lib/util-publish.sh
+++ b/lib/util-publish.sh
@@ -47,6 +47,9 @@ sync_dir(){
cont=1
max_cont=10
prepare_transfer "$1" "${hidden}"
+
+ ${sign} && signiso "$1"
+
msg "Start upload [%s] to [%s] ..." "$1" "${project}"
while [[ $cont -le $max_cont ]]; do
rsync ${rsync_args[*]} ${src_dir}/ ${url}/${target_dir}/