X-Git-Url: https://git.distorted.org.uk/~mdw/dvdrip/blobdiff_plain/861c3824fb4801c9952bd10fcb2369307f355e7b..604a495002ac9390d760fffefcbe27372337cc38:/dvdrip diff --git a/dvdrip b/dvdrip index 250e642..ad7a280 100755 --- a/dvdrip +++ b/dvdrip @@ -151,21 +151,13 @@ case $backup in nil) if [ ! -f "$tmp/$tag/iso" ]; then accumulate_badblocks - run_setrc "$DVD_SECTOR_COPY" -c -b"$tmp/$tag/badblocks.new" \ - "$dev" "$tmp/$tag/iso.new" + 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 $rc in - 0) - run mv "$tmp/$tag/iso.new" "$tmp/$tag/iso" - ;; - 1) - run mv "$tmp/$tag/iso.new" "$tmp/$tag/iso" - fail "bad sectors found: check \`$tmp/$tag/iso', run again if ok" - ;; - *) - fail "$DVD_SECTOR_COPY: exit $rc" - ;; - esac + if [ -f "$tmp/$tag/badblocks" ]; then + fail "bad sectors found: check \`$tmp/$tag/iso', run again if ok" + fi fi ;; esac