-
Notifications
You must be signed in to change notification settings - Fork 1
/
customize-rom.sh
executable file
·76 lines (67 loc) · 1.67 KB
/
customize-rom.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/sh
#run modFiles.pl
#remove the data directory if you want to start from scratch
#run reget_files.sh to be sure you have all the files
#run rm-files.sh to remove unwanted files (only removes for now)
#run makerom.sh with "-d XdX" to write to the drive at /dev/XdX
# or
#run makerom.sh without "-d" to just make a rom-partition file
echo ""
echo "Do you wish to make a custom rom or write a generic one to disk?"
echo -n "Type Y for custom, N for generic. "
while read -n 1 YESNO; do
if [ "$YESNO" == "n" -o "$YESNO" == "N" ]; then
echo ""
#get rom-partition and table.sct
./get_generic.sh
echo "If you know the /dev/ entry of your microdrive, enter it now."
echo "If you do not, enter nothing."
while read DEV; do
if [ -n "$DEV" -a "$DEV" != "dunno" ]; then
DDEV="-d $DEV"
break
elif [ "$DEV" == "dunno" ]; then
DDEV=""
break
elif [ "$DEV" == "" ]; then
DDEV=""
break
fi
done
./write_rom.sh $DDEV
exit
fi
if [ "$YESNO" == "y" -o "$YESNO" == "Y" ]; then
break
fi
done
echo ""
./modFiles.pl
echo ""
echo -n "Do you wish to start with fresh files? [Y/n] "
while read -n 1 YESNO; do
if [ "$YESNO" == "y" -o "$YESNO" == "Y" ]; then
rm -rf data
break
fi
if [ "$YESNO" == "n" -o "$YESNO" == "N" ]; then
break
fi
done
echo ""
echo "Getting any necessary files now:"
./reget_files.sh
./rm-files.sh
echo "If you know the /dev/ entry of your microdrive, enter it now."
echo "If you do not, enter \"dunno\" without quotes."
while read DEV; do
if [ -n "$DEV" -a "$DEV" != "dunno" ]; then
DDEV="-d $DEV"
break
elif [ "$DEV" == "dunno" ]; then
DDEV=""
break
fi
done
./make_rom.sh $DDEV
echo "Finished."