summaryrefslogtreecommitdiff
path: root/hosts/iroha/scripts/rip-dvd
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2025-07-19 15:50:09 -0400
committerAndrew Opalach <andrew@akon.city> 2025-07-19 15:50:09 -0400
commit85a47287e56ba9100420246531ebea5996cc0486 (patch)
tree7c70a593fc2678fd7175c32188bbae32044ed08d /hosts/iroha/scripts/rip-dvd
parent68f39eb867c851acb651f79604aba119ecaa9527 (diff)
downloaddotfiles-85a47287e56ba9100420246531ebea5996cc0486.tar.gz
dotfiles-85a47287e56ba9100420246531ebea5996cc0486.tar.bz2
dotfiles-85a47287e56ba9100420246531ebea5996cc0486.zip
End of NixOS container era
Diffstat (limited to 'hosts/iroha/scripts/rip-dvd')
-rwxr-xr-xhosts/iroha/scripts/rip-dvd13
1 files changed, 13 insertions, 0 deletions
diff --git a/hosts/iroha/scripts/rip-dvd b/hosts/iroha/scripts/rip-dvd
new file mode 100755
index 0000000..6886ee9
--- /dev/null
+++ b/hosts/iroha/scripts/rip-dvd
@@ -0,0 +1,13 @@
+#! /usr/bin/env bash
+
+# https://old.reddit.com/r/linux/comments/b3kj72/recently_decided_to_archive_some_of_my_dvds/
+#NAME=$1
+#ARRAY=($(isoinfo -d -f -i /dev/sr0 | grep -i -E 'block size|volume size' | sed '/is/ s/[^:]*: *//; s/,.*//'))
+#printf "Creating $NAME\n"
+#printf "bs=${ARRAY[0]}, count=${ARRAY[1]}\n"
+#dcfldd if=/dev/sr0 of=$NAME bs=${ARRAY[0]} count=${ARRAY[1]} status=on errlog=errors.log hash=md5 hashlog=hash.log
+
+# https://gist.github.com/Querulous/3124f53ce6ddf5a55c262234e74028ba
+BLOCK_SIZE=$(isosize -x /dev/sr0 | awk '{print $6}')
+# ddrescue "direct" mode doesn't work with my drive, it just spams errors.
+ddrescue -b $BLOCK_SIZE -r 1 -v /dev/sr0 --log-events=events.log --log-rates=rates.log --log-reads=reads.log "$1.iso" "$1.log"