Added img2iso function in zsh

This commit is contained in:
Christian Baer 2020-05-28 23:50:31 +02:00
parent 9d7f21f504
commit 8b72233e29
2 changed files with 17 additions and 0 deletions

16
.zsh/functions/img2iso Normal file
View File

@ -0,0 +1,16 @@
function img2iso () {
if [ -z "$1" ]; then
# display usage if no parameters given
echo "Usage: img2iso <file_name>"
return 1
else
if [ -f "$1" ] ; then
filename=`basename $1 .img`
hdiutil convert ${filename}.img -format UDTO -o ${filename}.iso
mv ${filename}.iso.cdr ${filename}.iso
else
echo "'$n' - file does not exist"
return 1
fi
fi
}

View File

@ -1,3 +1,4 @@
fpath+=$ZDOTDIR/functions
autoload extract
autoload img2iso