From 49c9c43a5cafd2dcce75d7941863314dab4d3df9 Mon Sep 17 00:00:00 2001 From: John D Pell Date: Mon, 6 Sep 2021 21:54:51 -0700 Subject: [PATCH] plugins/base: `mkiso()` --- plugins/available/base.plugin.bash | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/available/base.plugin.bash b/plugins/available/base.plugin.bash index 89cc9a49..ef200d4a 100644 --- a/plugins/available/base.plugin.bash +++ b/plugins/available/base.plugin.bash @@ -169,13 +169,13 @@ function mkiso() example 'mkiso ISO-Name dest/path src/path' group 'base' - [ -z ${1+x} ] && local isoname=${PWD##*/} || local isoname=$1 - [ -z ${2+x} ] && local destpath=../ || local destpath=$2 - [ -z ${3+x} ] && local srcpath=${PWD} || local srcpath=$3 + local isoname="${1:-${PWD##*/}}" + local destpath="${2:-../}" + local srcpath="${3:-${PWD}}" 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" fi