- if [ ! -f "$tmp/$tag/iso" ]; then
- run genisoimage -quiet -dvd-video -udf -V "$label" \
- -o "$tmp/$tag/iso.new" "$tmp/$tag/rip"
- run mv "$tmp/$tag/iso.new" "$tmp/$tag/iso"
- fi
- ;;
- nil)
- accumulate_badblocks
- case $retry in
- t)
- if [ -f "$tmp/$tag/badblocks.retry" ]; then
- :
- elif [ -f "$tmp/$tag/badblocks" ]; then
- run mv "$tmp/$tag/badblocks" "$tmp/$tag/badblocks.retry"
- else
- fail "no blocks to retry"
- fi
- set -- "$@" -R"$tmp/$tag/badblocks.retry"
- if [ -f "$tmp/$tag/iso" ]; then
- mv "$tmp/$tag/iso" "$tmp/$tag/iso.new"
- fi
- ;;
- esac
- if [ ! -f "$tmp/$tag/iso" ]; then
- run "$DVD_SECTOR_COPY" -c -b"$tmp/$tag/badblocks.new" "$@" \
- "$dev" "$tmp/$tag/iso.new"
- run mv "$tmp/$tag/iso.new" "$tmp/$tag/iso"
- accumulate_badblocks
- case $retry in t) rm -f "$tmp/$tag/badblocks.retry" ;; esac
- if [ -f "$tmp/$tag/badblocks" ]; then
- fail "bad sectors found: check \`$tmp/$tag/iso', run again if ok"
- fi
+ set -- "$@" -R"$tmp/$tag/badblocks.retry"
+ if [ -f "$tmp/$tag/iso" ]; then
+ mv "$tmp/$tag/iso" "$tmp/$tag/iso.new"