Last active
January 14, 2017 20:42
-
-
Save RandomInsano/bfbb5b82b8280dcc6e64 to your computer and use it in GitHub Desktop.
Simple scipt for backing up some floppies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# usage: <drive path> <folder name> | |
# | |
# ex: copy.sh /dev/floppy0 "Where in the World is Carmen Sandeigo" | |
let a=0 | |
echo "Creating directory for '$2'" | |
mkdir -p "$2" | |
while true; | |
do | |
let a=$a+1 | |
echo | |
echo "About to clone disk $a" | |
echo "Press enter to start." | |
read | |
pv $1 > "$2/Disk $a.img" | |
if [ $? -ne 0 ]; then | |
let a=$a-1 | |
fi | |
eject $1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment