Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archiso/mkarchiso
diff options
context:
space:
mode:
authornl6720 <nl6720@gmail.com>2022-11-26 21:18:15 +0200
committernl6720 <nl6720@gmail.com>2022-12-10 12:08:50 +0200
commit2da65f64adfbce72671cdd7e482b55f1f83d135d (patch)
tree5658b84d7dd84d41432a7c06c5336bb5f450b971 /archiso/mkarchiso
parent2c3420204e25c31b6768f8e30ade348db757b722 (diff)
mkarchiso: check if the code signing files specified with option -c exist
Look for the files in `*_validate_options` and error out early if they do not exist.
Diffstat (limited to 'archiso/mkarchiso')
-rwxr-xr-xarchiso/mkarchiso10
1 files changed, 9 insertions, 1 deletions
diff --git a/archiso/mkarchiso b/archiso/mkarchiso
index 7a3fd1c..8449f51 100755
--- a/archiso/mkarchiso
+++ b/archiso/mkarchiso
@@ -1522,7 +1522,7 @@ _read_profile() {
# Validate set options
_validate_options() {
- local validation_error=0 _buildmode
+ local validation_error=0 _buildmode certfile
_msg_info "Validating options..."
@@ -1532,6 +1532,14 @@ _validate_options() {
_msg_error "File '${pacman_conf}' does not exist." 0
fi
+ # Check if the code signing certificate files exist
+ for certfile in "${cert_list[@]}"; do
+ if [[ ! -e "$certfile" ]]; then
+ (( validation_error=validation_error+1 ))
+ _msg_error "Code signing certificate '${certfile}' does not exist." 0
+ fi
+ done
+
# Check if the specified buildmodes are supported
for _buildmode in "${buildmodes[@]}"; do
if typeset -f "_build_buildmode_${_buildmode}" &> /dev/null; then