summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2024-04-05 18:14:15 +0200
committer Eric Hameleers <alien@slackware.com>2024-04-05 18:14:15 +0200
commit0d4377558f8406a7408b80ea6edd0596961a84ec (patch)
tree0cf09adcdfe11205b0724170f12303a66c1fe120
parent97c5a5f9b3e6bbb7748dbf256dc7b6f71c167aa1 (diff)
downloadliveslak-0d4377558f8406a7408b80ea6edd0596961a84ec.tar.gz
liveslak-0d4377558f8406a7408b80ea6edd0596961a84ec.tar.xz
Prevent error message caused by empty variable
-rw-r--r--upslak.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/upslak.sh b/upslak.sh
index 0a82690..c36071d 100644
--- a/upslak.sh
+++ b/upslak.sh
@@ -1106,7 +1106,7 @@ if [ -f "${EXTENSION}" ]; then
# User already mounted the USB linux partition; remove mountpoint:
EXTENSION="${EXTENSION#$EXTMNT}"
fi
-elif [ "$(dirname ${EXTENSION})" == "." ]; then
+elif [ -n "${EXTENSION}" && "$(dirname ${EXTENSION})" == "." ]; then
# Containerfile was provided without leading slash, add one:
EXTENSION="/${EXTENSION}"
fi