From 454be118a90466d17828d75a24e0e539afa73001 Mon Sep 17 00:00:00 2001 From: John D Pell Date: Mon, 6 Sep 2021 22:07:16 -0700 Subject: [PATCH] plugins/base: `mkiso()` Expressly handle unbound parameters. --- plugins/available/base.plugin.bash | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/available/base.plugin.bash b/plugins/available/base.plugin.bash index c2496171cb..40d5638ae5 100755 --- a/plugins/available/base.plugin.bash +++ b/plugins/available/base.plugin.bash @@ -175,11 +175,11 @@ then mkiso () local destpath="${2:-../}" local srcpath="${3:-${PWD}}" - if [ ! -f "${destpath}${isoname}.iso" ]; then + if [ ! -f "${destpath%/}/${isoname}.iso" ]; then echo "writing ${isoname}.iso to ${destpath} from ${srcpath}" - mkisofs -V "${isoname}" -iso-level 3 -r -o "${destpath}${isoname}.iso" "${srcpath}" + mkisofs -V "${isoname}" -iso-level 3 -r -o "${destpath%/}/${isoname}.iso" "${srcpath}" else - echo "${destpath}${isoname}.iso already exists" + echo "${destpath%/}/${isoname}.iso already exists" fi } fi