-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathk1000.sh
47 lines (42 loc) · 982 Bytes
/
k1000.sh
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash -e
#
# k1000.sh - Provisions an emulated mac99 machine with the ObjectMover software
# and patches from the AX, GX, HX & SX expanders.
#
# Author: rob@computerlab.io
K1000_TMP_PATH=/tmp/k1000
function fetch_archives() {
path=$1
while read archive; do
curl -o "$path/$(basename $archive)" $archive
done < archives.txt
}
function copy_archives() {
src=$1
dst=$2
mkdir -p "$dst/Desktop Folder/K1000/"
cp "$src/*" "$dst/Desktop Folder/K1000/"
}
function cleanup_archives() {
path=$1
rm -rf $path
}
case $1 in
install)
./mac99.sh install
fetch_archives $K1000_TMP_PATH
VOLUME=./mac99.sh mount
copy_archives $K1000_TMP_PATH $VOLUME
./mac99.sh umount
cleanup_archives $K1000_TMP_PATH
;;
run)
./mac99.sh run
;;
*)
echo "usage"
echo " ./k1000.sh install"
echo " ./k1000.sh run"
exit 1
;;
esac