Added img2iso function in zsh
This commit is contained in:
parent
9d7f21f504
commit
8b72233e29
16
.zsh/functions/img2iso
Normal file
16
.zsh/functions/img2iso
Normal 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
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
fpath+=$ZDOTDIR/functions
|
||||
|
||||
autoload extract
|
||||
autoload img2iso
|
||||
|
Loading…
Reference in New Issue
Block a user