chiark
/
gitweb
/
~mdw
/
dvdrip
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
364b4be
)
dvdrip: Collect together bad-blocks lists from repeated runs.
author
Mark Wooding
<mdw@distorted.org.uk>
Sat, 19 Feb 2022 01:55:28 +0000
(
01:55
+0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sat, 19 Feb 2022 01:55:28 +0000
(
01:55
+0000)
dvdrip
patch
|
blob
|
blame
|
history
diff --git
a/dvdrip
b/dvdrip
index 73400b66cbfeee78dc90fa71fdccc41ce2d092ac..5c1e72bedfa58e99709f5ee4c85633509d510320 100755
(executable)
--- a/
dvdrip
+++ b/
dvdrip
@@
-117,6
+117,16
@@
case $rc,$force in
0,t) warn "output file already exists; will overwrite" ;;
esac
0,t) warn "output file already exists; will overwrite" ;;
esac
+accumulate_badblocks () {
+ if [ -f "$tmp/$tag/badblocks.new" ]; then
+ if [ ! -f "$tmp/$tag/badblocks" ]; then
+ { echo "## bad-blocks region map"; echo; } >"$tmp/$tag/badblocks"
+ fi
+ sed -n "/^[^#]/p" "$tmp/$tag/badblocks.new" >>"$tmp/$tag/badblocks"
+ rm "$tmp/$tag/badblocks.new"
+ fi
+}
+
mkdir -p "$tmp/$tag"
case $backup in
t)
mkdir -p "$tmp/$tag"
case $backup in
t)
@@
-133,8
+143,10
@@
case $backup in
;;
nil)
if [ ! -f "$tmp/$tag/iso" ]; then
;;
nil)
if [ ! -f "$tmp/$tag/iso" ]; then
- run_setrc "$DVD_SECTOR_COPY" -c -b"$tmp/$tag/badblocks" \
+ accumulate_badblocks
+ run_setrc "$DVD_SECTOR_COPY" -c -b"$tmp/$tag/badblocks.new" \
"$dev" "$tmp/$tag/iso.new"
"$dev" "$tmp/$tag/iso.new"
+ accumulate_badblocks
case $rc in
0)
run mv "$tmp/$tag/iso.new" "$tmp/$tag/iso"
case $rc in
0)
run mv "$tmp/$tag/iso.new" "$tmp/$tag/iso"