Advertisement
zefie

iso2ciso (cygwin, via ptiso)

Apr 18th, 2018
377
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.48 KB | None | 0 0
  1. #!/bin/bash
  2. if [ ! -z "$1" ]; then
  3.     path=$(readlink -f "$1")
  4.     winpath=$(echo $path | sed -E "s/\/cygdrive\/([a-z])/\u\1\:/" | sed "s/\//\\\/g")
  5.     if [ ! -z "$winpath" ]; then
  6.         cisofile=$(echo $winpath | rev | cut -d'.' -f2- | rev).ciso
  7.         echo "Input file: $winpath"
  8.         echo "Output file: $cisofile"
  9.         "/cygdrive/c/Program Files/Pismo File Mount Audit Package/ptiso.exe" convert -t ciso -z lzma "$winpath" "$cisofile"
  10.         exit 0;
  11.     fi
  12.     exit 1
  13. else
  14.     echo "Usage: $0 isofile"
  15.     exit 1
  16. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement