| 1 | #!/bin/bash |
| 2 | |
| 3 | # Creates a random Amiga ADF, writes the first three cylinders of a disk, |
| 4 | # dumps those cylinders back, and checks against original ADF. |
| 5 | dd if=/dev/urandom of=b.adf bs=512 count=1760 |
| 6 | disk-analyse -e 2 b.adf a.adf |
| 7 | rm -f b.adf |
| 8 | |
| 9 | # Write and verify ADF, Read ADF |
| 10 | gw --bt write --tracks="c=0-2" a.adf |
| 11 | gw --bt read --revs=1 --tracks="c=0-2" b.adf |
| 12 | disk-analyse -e 2 b.adf c.adf |
| 13 | diff a.adf c.adf |
| 14 | md5sum a.adf c.adf |
| 15 | rm -f b.adf c.adf |
| 16 | |
| 17 | # Write SCP, Read SCP |
| 18 | disk-analyse a.adf a.scp |
| 19 | gw --bt write --tracks="c=0-2" a.scp |
| 20 | gw --bt read --revs=1 --tracks="c=0-2" b.scp |
| 21 | disk-analyse -e 2 b.scp b.adf |
| 22 | diff a.adf b.adf |
| 23 | md5sum a.adf b.adf |
| 24 | rm -f b.adf a.scp b.scp |
| 25 | |
| 26 | # Write IPF, Read HFE |
| 27 | disk-analyse a.adf a.ipf |
| 28 | gw --bt write --tracks="c=0-2" a.ipf |
| 29 | gw --bt read --revs=1 --tracks="c=0-2" b.hfe |
| 30 | disk-analyse -e 2 b.hfe b.adf |
| 31 | diff a.adf b.adf |
| 32 | md5sum a.adf b.adf |
| 33 | rm -f b.adf a.ipf b.hfe |
| 34 | |
| 35 | # Write HFE, Read HFE |
| 36 | disk-analyse a.adf a.hfe |
| 37 | gw --bt write --tracks="c=0-2" a.hfe |
| 38 | gw --bt read --revs=1 --tracks="c=0-2" b.hfe |
| 39 | disk-analyse -e 2 b.hfe b.adf |
| 40 | diff a.adf b.adf |
| 41 | md5sum a.adf b.adf |
| 42 | |
| 43 | # Read Kryoflux |
| 44 | mkdir a |
| 45 | gw --bt read --revs=1 --tracks="c=0-2" a/ |
| 46 | disk-analyse -e 2 a/ b.adf |
| 47 | diff a.adf b.adf |
| 48 | md5sum a.adf b.adf |
| 49 | rm -f b.adf c.adf a.hfe b.hfe |
| 50 | rm -rf a |
| 51 | |
| 52 | rm -f a.adf |