I created a shell script (bash) that automates all of this on the command line.
It's beta - so use at your own risk! I cannot commit to supporting the code.
But I coded it to be safe, it creates a working copy for all changes - leaving the original ISO untouched.
Requires abgx360-1.0.6 OSX package to be installed, as well as the Binaries package at the top of this thread.
Save the script as whatever filename you'd like, in the same directory as the the binaries you just downloaded. The only argument it needs is the original iso's filename. The script will automatically detect your burner (but only if there is blank media in it)
process.sh:
CODE
#!/bin/sh
TSIZE="8547991552"
LAYERBREAK="2086912"
BURNSPEED="2" # or 4
TEMPISO="working.iso"
SCRIPT="$0"
PWD=$(pwd)
EXEDIR=${0%/*}
if [ ! $1 ]; then
echo "usage: $SCRIPT <original.iso>"
exit 0
fi
ISO="$1"
if [ ! -f $ISO ]; then
echo "error: $ISO does not exist"
exit 0
fi
#check file copy
if [ -f $TEMPISO ]; then
ZI=$(stat -f "%z" "$ISO")
ZT=$(stat -f "%z" "$TEMPISO")
if [ "$ZI" -eq "$ZT" ]; then
SKIP=1
fi
if [ "$ZT" -eq "$TSIZE" ]; then
echo "! working copy exists and is truncated - most likely abgx has already repaired the topology info."
echo "?force new working copy and abgx check? [Y/n]"
read a
if [[ $a != "Y" ]]; then
SKIPABGX=1
SKIP=1
fi
fi
fi
if [ ! $SKIP ]; then
echo "> making duplicate working copy ($TEMPISO)"
EXE=$(which rsync)
if [ ! -x $EXE ]; then
echo "! could not find rsync"
exit 0
else
$EXE -v --progress $ISO $TEMPISO
fi
else
echo 'working copy exists, skipping duplication'
fi
if [ ! $SKIPABGX ]; then
#abx check (repair)
EXE=$(which abgx360)
if [ ! -x "$EXE" ]; then
echo "! could not find executable (abgx360)"
exit 0
else
$EXE - -- $TEMPISO
fi
else
echo 'skipping abgx verify/patch'
fi
#truncate
EXE="$EXEDIR/truncate"
if [ ! -x $EXE ]; then
echo "! could not find executable ($EXE)"
exit 0
fi
ZT=$(stat -f "%z" "$TEMPISO")
if [ "$ZT" -eq "$TSIZE" ]; then
echo '>skipping truncate, already done'
else
echo "#original size: $ZT"
# echo "truncate size: $TSIZE"
# echo "truncate? [Y/n]"
# read a
# if [[ $a == "Y" ]]; then
$EXE $TEMPISO $TSIZE
echo '>truncating...'
ZT=$(stat -f "%z" "$TEMPISO")
echo "#new size: $ZT"
# else
# echo 'user break'
# exit 0
# fi
fi
#check media
EXE="$EXEDIR/dvd+rw-mediainfo"
if [ ! -x $EXE ]; then
echo "! could not find executable ($EXE)"
exit 0
fi
#check for burner and blank disc
for i in `seq 1 10`;
do
DVD="/dev/disk"$i
DVDSTAT=$($EXE $DVD 2>/dev/null)
if [[ $DVDSTAT =~ "INQUIRY" ]]; then
BURNER="/dev/rdisk"$i
echo "found burner at $BURNER"
if [[ ! $DVDSTAT =~ "Double Layer" ]]; then
echo 'media is not DVD-DL'
exit 0
fi
if [[ ! $DVDSTAT =~ "blank" ]]; then
echo 'media is not blank'
exit 0
fi
fi
done
if [ ! $BURNER ]; then
echo 'error: no DVD burner or no blank media in drive'
exit 0
fi
#burn it!
EXE="$EXEDIR/growisofs"
if [ ! -x $EXE ]; then
echo "! could not find executable ($EXE)"
exit 0
fi
echo "burn? [Y/n]"
read a
if [[ $a == "Y" ]]; then
echo ' burning'
CMD="$EXE -use-the-force-luke=dao -use-the-force-luke=break:$LAYERBREAK -dvd-compat -speed=$BURNSPEED -Z $BURNER=$TEMPISO"
echo $CMD
$CMD
echo 'Done Burning!'
else
echo 'user break'
exit 0
fi
echo "remove temporary working ISO? [Y/n]"
read a
if [[ $a == "Y" ]]; then
rm $TEMPISO
echo 'working copy iso removed!'
else
exit 0
fi
echo 'Done!'