plugins/base: `mkiso()`

pull/1930/head
John D Pell 2021-09-06 21:54:51 -07:00
parent 9ba76b607a
commit 49c9c43a5c
1 changed files with 4 additions and 4 deletions

View File

@ -169,13 +169,13 @@ function mkiso()
example 'mkiso ISO-Name dest/path src/path' example 'mkiso ISO-Name dest/path src/path'
group 'base' group 'base'
[ -z ${1+x} ] && local isoname=${PWD##*/} || local isoname=$1 local isoname="${1:-${PWD##*/}}"
[ -z ${2+x} ] && local destpath=../ || local destpath=$2 local destpath="${2:-../}"
[ -z ${3+x} ] && local srcpath=${PWD} || local srcpath=$3 local srcpath="${3:-${PWD}}"
if [ ! -f "${destpath}${isoname}.iso" ]; then if [ ! -f "${destpath}${isoname}.iso" ]; then
echo "writing ${isoname}.iso to ${destpath} from ${srcpath}" 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 else
echo "${destpath}${isoname}.iso already exists" echo "${destpath}${isoname}.iso already exists"
fi fi