plugins/base: `mkiso()`
parent
9ba76b607a
commit
49c9c43a5c
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue