chiark / gitweb /
dvdrip-retry-botched-vobs: Eject discs when we're done with them.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 6 Mar 2022 01:27:14 +0000 (01:27 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 6 Mar 2022 01:28:02 +0000 (01:28 +0000)
dvdrip-retry-botched-vobs

index c281b608c87bbd537fbf5b4cf90be61e5f6491b4..579537e542ef29e5cd01a5b4e2f2fbb7996e8772 100755 (executable)
@@ -13,7 +13,11 @@ find "$@" -type f -name "*.retry" -print | while IFS= read -r r; do
     case $id in
       "$want_id") break ;;
       "$last_wrong") ;;
-      *) echo "No, that's $id -- wanted $want_id..."; last_wrong=$id ;;
+      *)
+       echo "No, that's $id -- wanted $want_id..."
+       last_wrong=$id
+       eject "$dev"
+       ;;
     esac
     sleep 2
   done
@@ -29,4 +33,5 @@ find "$@" -type f -name "*.retry" -print | while IFS= read -r r; do
       *) echo "Failed! :-("; exit 2 ;;
     esac
   done
+  eject "$dev"
 done