-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_mister_scripts.sh
197 lines (156 loc) · 6.02 KB
/
install_mister_scripts.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
#!/bin/bash
source /media/fat/Scripts
# Check network connectivity
echo -e "GET http://google.com HTTP/1.0\n\n" | nc google.com 80 > /dev/null 2>&1
online=false
if [ $? -eq 0 ]; then
echo "Online"
online=true
else
echo "Offline"
online=false
fi
## Run installation
## Recheck internet connectivity
echo -e "GET http://google.com HTTP/1.0\n\n" | nc google.com 80 > /dev/null 2>&1
online=false
if [ $? -eq 0 ]; then
echo "Online"
online=true
else
echo "Offline"
online=false
fi
#if ["$online" == true]; then
echo "Now that we have network connection, let's install all the scripts!"
echo "Download Mister installation download.sh script"
wget https://github.com/MiSTer-devel/Downloader_MiSTer/releases/download/latest/MiSTer_Downloader.zip
unzip MiSTer_Downloader.zip
# Update. Mister initial configuration.
dialog --title "Perform initial update" \
--backtitle "Perform initial update?" \
--yesno "Do you want to Perform initial update?" 7 60
response=$?
case $response in
0)
dialog --infobox "Updating the initial mister configuration." 0 0 ; sleep 4
echo "Update mister installation ..."
./download.sh
;;
1)
echo "Skipping initial update"
;;
esac
# Update all Script
dialog --title "Install and run update_all script" \
--backtitle "Install and run update_all script?" \
--yesno "Do you want to install and run update_all script?" 7 60
response=$?
case $response in
0)
dialog --infobox "Installing and executing UpdateAll script." 0 0 ; sleep 4
echo "Getting update_all script "
wget https://raw.githubusercontent.com/theypsilon/Update_All_MiSTer/master/update_all.sh
chmod +x update_all.sh
echo "Executing update_all script. Please follow the onscreen instructions..."
./update_all.sh
;;
1)
echo "Skipping update all"
;;
esac
dialog --infobox "Now we will configure the rest of the setup." 0 0 ; sleep 4
# Set correct timezone
echo "Setting timezone..."
timezone.sh
# Cifs Download
dialog --title "Cifs script download" \
--backtitle "Do you want to install the Cifs (samba) scripts?" \
--yesno "Do you want to install the Cifs (samba) scripts?" 7 60
response=$?
case $response in
0)
echo "Download Cifs mount and umount scripts ..."
wget https://raw.githubusercontent.com/MiSTer-devel/Scripts_MiSTer/master/cifs_mount.sh
wget https://raw.githubusercontent.com/MiSTer-devel/Scripts_MiSTer/master/cifs_umount.sh
;;
1)
echo "Cifs scripts not installed"
;;
esac
# Retrodriven Wallpapers Now through update_all.sh
'''
dialog --title "Wallpapers" \
--backtitle "Do you want to install the wallpapers from Retrodriven?" \
--yesno "Do you want to install the wallpapers from Retrodriven?" 7 60
response=$?
case $response in
0)
# Wallpapers
echo "Download wallpaper script from retrodriven"
wget https://github.com/RetroDriven/MiSTerWallpapers/releases/download/1.1/MiSTer.Wallpapers.v1.1.zip -O MiSTer.Wallpapers.zip
unzip MiSTer.Wallpapers.zip
rm MiSTer.Wallpapers.zip
echo "Configuring background wallpaper..."
chmod -x Update_MiSTerWallpapers.sh
sed -i '/^SELF_MANAGED="False"/SELF_MANAGED="true"/' Update_MiSTerWallpapers.ini
./Update_MiSTerWallpapers.sh
exit;;
1)
echo "Skipping wallpaper installation"
exit;;
esac
'''
# Audio normalization
dialog --title "Audio normalization" \
--backtitle "Do you want to install the Audio normalization scripts (make all the cores sound at the same volume)?" \
--yesno "Do you want to install the Audio normalization scripts (make all the cores sound at the same volume)?" 7 60
response=$?
case $response in
0)
echo "Getting Mister normalize audio "
wget https://raw.githubusercontent.com/misteraddons/normalize_audio_scripts/main/normalize_audio_%2B6dB.sh
wget https://raw.githubusercontent.com/misteraddons/normalize_audio_scripts/main/normalize_audio_0dB.sh
;;
1)
echo "Skipping Audiuo normalization script installation"
;;
esac
# BGM configuraiton
dialog --title "Background Music player" \
--backtitle "Do you want to configure the Background Music player?" \
--yesno "Do you want to configure the Background Music player?" 7 60
response=$?
case $response in
0)
echo "Configuring BGM..."
echo "[playlist]" >>bgm.ini
echo "NumberOfEntries=1" >>bgm.ini
echo "NumberOfEntries=1" >>bgm.ini
echo "File1=http://us3.internet-radio.com:8324/listen.pls" >> bgm.ini
echo "Length1=-1" >>bgm.ini
;;
1)
echo "Skipping BGM player configuration"
;;
esac
# PSX mempacks
dialog --title "PSX mempacks" \
--backtitle "Do you want to download the PSX mempacks?" \
--yesno "Do you want to download the PSX mempacks?" 7 60
response=$?
case $response in
0 )
echo "Downloading Mempack packs for PSX..."
curl -o /media/fat/games/PSX/ https://github.com/Pezz82/MemCard-Pro-Packs/archive/refs/heads/main.zip
echo "Unzipping PSX Mempack..."
unzip /media/fat/games/PSX/main.zip -d /media/fat/games/PSX/
rm /media/fat/games/PSX/main.zip
;;
1)
echo "Non PSX mempack downloaded."
;;
esac
# Final completion message
dialog --title "Installation Complete" --msgbox "Installation Complete" 0 0
# fi;