summaryrefslogtreecommitdiffstats
path: root/mkinitcpio
diff options
context:
space:
mode:
Diffstat (limited to 'mkinitcpio')
-rwxr-xr-xmkinitcpio19
1 files changed, 10 insertions, 9 deletions
diff --git a/mkinitcpio b/mkinitcpio
index 434172e..0b2a573 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -163,7 +163,7 @@ readonly NC BOLD BLUE GREEN RED YELLOW
if [[ $BASEDIR ]]; then
# resolve the path. it might be a relative path and/or contain symlinks
if ! pushd "$BASEDIR" &>/dev/null; then
- die "base directory '$BASEDIR' does not exist or is not a directory"
+ die "base directory does not exist or is not a directory: \`%s'" "$BASEDIR"
fi
BASEDIR=$(pwd -P)
BASEDIR=${BASEDIR%/}
@@ -172,13 +172,14 @@ fi
if [[ $optkver ]]; then
if ! KERNELVERSION=$(get_kernver "$optkver"); then
- die "'$optkver' is an invalid kernel specifier"
+ [[ ${optkver:0:1} == / ]] && optkver=$BASEDIR$optkver
+ die "invalid kernel specifier: \`%s'" "$optkver"
fi
fi
if [[ $TMPDIR ]]; then
if [[ ! -d $TMPDIR ]]; then
- error "'$TMPDIR' does not exist or is not a directory"
+ error "Temporary directory does not exist or is not a directory: \`%s'" "$TMPDIR"
unset TMPDIR
cleanup 1
fi
@@ -207,7 +208,7 @@ if [[ $PRESET ]]; then
if [[ ${!preset_kver:-$ALL_kver} ]]; then
preset_cmd+=(-k "${!preset_kver:-$ALL_kver}")
else
- warning "No kernel version specified. Skipping image '%s'" "$p"
+ warning "No kernel version specified. Skipping image \`%s'" "$p"
continue
fi
@@ -215,7 +216,7 @@ if [[ $PRESET ]]; then
if [[ ${!preset_config:-$ALL_config} ]]; then
preset_cmd+=(-c "$BASEDIR${!preset_config:-$ALL_config}")
else
- warning "No configuration file specified. Skipping image '%s'" "$p"
+ warning "No configuration file specified. Skipping image \`%s'" "$p"
continue
fi
@@ -223,7 +224,7 @@ if [[ $PRESET ]]; then
if [[ ${!preset_image} ]]; then
preset_cmd+=(-g "$BASEDIR${!preset_image}")
else
- warning "No image file specified. Skipping image '%s'" "$p"
+ warning "No image file specified. Skipping image \`%s'" "$p"
continue
fi
@@ -237,19 +238,19 @@ if [[ $PRESET ]]; then
done
cleanup 0
else
- die "Preset $PRESET does not exist. Exiting."
+ die "Preset not found: \`%s'" "$PRESET"
fi
fi
if [[ $GENIMG ]]; then
IMGPATH=$(readlink -f "$GENIMG")
if [[ -z $IMGPATH || ! -w ${IMGPATH%/*} ]]; then
- die "error: unable to write to path: '$GENIMG'"
+ die "error: unable to write to path: \`%s'" "$GENIMG"
fi
fi
if [[ ! -f "$CONFIG" ]]; then
- die "config file '$CONFIG' cannot be found, aborting..."
+ die "Config file does not exist: \`%s'" " $CONFIG"
fi
. "$CONFIG"