diff options
author | BakedSnake <gilferrandm@gmail.com> | 2021-02-03 03:08:39 +0100 |
---|---|---|
committer | BakedSnake <gilferrandm@gmail.com> | 2021-02-03 03:08:39 +0100 |
commit | 48f7e4f75d42cb0c5e16d8078db86708e0c9efde (patch) | |
tree | 6710b29488f9b31d4ad089ae5231caf644ca10c8 |
initial commit
-rw-r--r-- | readme.md | 16 | ||||
-rwxr-xr-x | sdrive | 52 |
2 files changed, 68 insertions, 0 deletions
diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..4b091a1 --- /dev/null +++ b/readme.md @@ -0,0 +1,16 @@ +## S-Series Drive :: Shell Script + +#### A script to manage floppy disks in Akai S-series format + +You will need fdutils in order for this script to work. Also because of that this script only works on classic floppy drives(/dev/fdX). No usb! + +Prepare drive sets the drive to use 10 sectors per track. +Formating the drive will use superformat to format the disk in the same manner. + +Importing and writing just uses cat to get or write the disk. + +NOTE: ALways prepare the drive after you insert the floppy. The drive has to be prepared once before performing the other actions and you must prepare the drive each time you switch disks. + +Now go make some bangers and backup your disks to your favorite linux distro (or unixlike OS). + +Possibly will updates with other functions. @@ -0,0 +1,52 @@ +#!/bin/sh + +# Paths +drive= /dev/fd0 + +# Functions +prepDrive() { + echo 'preparing drive...' + setfdprm $drive sect=10 hd ssize=1024 cyl=80 +} + +formatDisk() { + echo 'formatting disk...' + superformat $drive sect=10 hd ssize=1024 cyl=80 +} + +iptImg() { + echo 'Enter the destination file path' + read iptloc + echo 'importing...' + cat $drive > $iptloc +} + +writeDisk() { + echo 'Enter img path' + read iptimg + echo 'writting' + cat $iptimg > $drive +} + +echo " + ###################################### + # S-Series Drive :: Shell Script # + ###################################### + + What would you like to do? + + 1. Prepare drive + 2. Format disk + 3. Import img from disk + 4. Write img to disk +" + +read choice + +case "$choice" in + 1) prepDrive ;; + 2) formatDisk ;; + 3) iptImg ;; + 4) writeDisk ;; +esac + |