blob: 4ca28e9218e6f01ea284516487362b12ca76bd4a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/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
|