zefie icon

iso2ciso (cygwin, via ptiso)

zefie | PRO | 04/18/18 06:41:23 PM UTC | 0 ⭐ | 766 👁️ | Never ⏰ | []
Bash |

480 B

|

None

|

0 👍

/

0 👎

#!/bin/bash
if [ ! -z "$1" ]; then
    path=$(readlink -f "$1")
    winpath=$(echo $path | sed -E "s/\/cygdrive\/([a-z])/\u\1\:/" | sed "s/\//\\\/g")
    if [ ! -z "$winpath" ]; then
        cisofile=$(echo $winpath | rev | cut -d'.' -f2- | rev).ciso
        echo "Input file: $winpath"
        echo "Output file: $cisofile"
        "/cygdrive/c/Program Files/Pismo File Mount Audit Package/ptiso.exe" convert -t ciso -z lzma "$winpath" "$cisofile"
        exit 0;
    fi
    exit 1
else
    echo "Usage: $0 isofile"
    exit 1
fi

Comments