aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPascal Dulieu <pascal@dulieu.uk>2019-03-07 15:08:31 +0000
committerPascal Dulieu <pascal@dulieu.uk>2019-03-07 15:08:31 +0000
commitbb9a141bbafa6478a3a916011ea22b7784906d7a (patch)
tree74047b6bbdfa9c3e1aa947040e5f44efd298f5d8
parentfe7e18f68aae6818de972d8ef406c0f899233f16 (diff)
Create ripdisk
-rw-r--r--ripdisk28
1 files changed, 28 insertions, 0 deletions
diff --git a/ripdisk b/ripdisk
new file mode 100644
index 0000000..b5b23d3
--- /dev/null
+++ b/ripdisk
@@ -0,0 +1,28 @@
+#!/bin/bash
+echo "Press Ctrl+C to stop the script"
+eject
+while :
+do
+echo "Please insert disc"
+disc=2
+while [[ $disc != 0 ]]
+do
+
+sudo blkid /dev/sr0 >> /dev/null
+disc=$?
+sleep 5
+
+done
+
+name=$(sudo blkid /dev/sr0 | cut -d= -f3 | cut -d'"' -f2)
+output=$(echo $name | sed -e 's/ /_/g')
+echo "Disc Found: $name"
+echo "Outputting to: $output.iso"
+
+# Set save path here
+dd if=/dev/sr0 | pv | dd of=~/ISOs/$output.iso
+
+echo "Finished! Insert your next disc"
+eject
+sleep 10
+done