-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDB-Install.sh
More file actions
135 lines (124 loc) · 5.92 KB
/
DB-Install.sh
File metadata and controls
135 lines (124 loc) · 5.92 KB
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
#!/bin/bash
export NCURSES_NO_UTF8_ACS=1
DB_SETTINGS="$HOME/.devilsbox/db_settings.ini"
###----------------------------###
### INSTALLER MENU FUNCTIONS ###
###----------------------------###
function main_menu() {
local choice
while true; do
choice=$(dialog --backtitle "$BACKTITLE" --title " DEVILS BOX 3.15---UPDATED 9/15/22 " \
--ok-label Select --cancel-label Exit-Installer \
--menu "DEVILS BOX RETROPIE INSTALLER" 25 50 30 \
1 "Install/Update Devils Box " \
2 "Devils Box Info " \
- "__________ __ " \
- "\______ \ _____/ |________ ____ " \
- " | _// __ \ __\_ __ \/ _ \ " \
- " | | \ ___/| | | | \( <_> ) " \
- " |____|_ /\___ >__| |__| \____/ " \
- " \/ \/ " \
- "________ .__.__ " \
- "\______ \ _______ _|__| | ______" \
- " | | \_/ __ \ \/ / | | / ___/" \
- " | ' \ ___/\ /| | |__\___ \ " \
- "/_______ /\___ >\_/ |__|____/____ >" \
- " \/ \/ \/ " \
2>&1 > /dev/tty)
case "$choice" in
1) install_db ;;
2) info ;;
-) no ;;
*) break ;;
esac
done
}
#----------------------------#
# INSTALL/UPDATE DEVILS BOX #
#----------------------------#
function install_db() {
if [ -d "$HOME/RetroPie/retropiemenu/Devils-Box/" ]; then sudo rm -R $HOME/RetroPie/retropiemenu/Devils-Box/; fi
if [ -f "$HOME/RetroPie/retropiemenu/Devils-Box.sh" ]; then sudo rm $HOME/RetroPie/retropiemenu/Devils-Box.sh; fi
if [ -d "$HOME/Devils-Box/" ]; then sudo rm -R $HOME/Devils-Box/; fi
cd $HOME
git clone https://github.com/Retro-Devils/Devils-Box
cp $HOME/Devils-Box/Devils-Box.sh -f $HOME/RetroPie/retropiemenu/
cp $HOME/Devils-Box/files/images/Devils-Box.png -f $HOME/RetroPie/retropiemenu/icons/
sudo cp $HOME/Devils-Box/files/box -f /usr/local/bin/
sudo cp $HOME/Devils-Box/Devils-Box.sh -f /usr/local/bin/Devils-Box
sudo wget -O "/usr/local/bin/confirm" https://raw.githubusercontent.com/Retro-Devils/Devils-Pi/main/things
sudo wget https://github.com/Retro-Devils/FE-Switcheroo/blob/main/switcheroo -f /usr/local/bin/switcheroo
sudo chmod 755 /usr/local/bin/confirm
sudo chmod 755 /usr/local/bin/box
chmod 755 $HOME/RetroPie/retropiemenu/Devils-Box.sh
sudo chmod 755 /usr/local/bin/Devils-Box
sudo chmod 755 /usr/local/bin/switcheroo
chmod -R 755 $HOME/Devils-Box
if [ ! -d "$HOME/.devilsbox" ]; then mkdir "$HOME/.devilsbox"; fi
if [ ! -f "$DB_SETTINGS" ]; then
cat <<\EOF_db_settings.ini > "$DB_SETTINGS"
#DB SETTINGS
auto_update_flag=0
intro_splash_flag=1
EOF_db_settings.ini
sudo chmod +x $DB_SETTINGS
fi
sleep 1
if [ ! -s "$HOME/RetroPie/retropiemenu/gamelist.xml" ]; then sudo rm -f $HOME/RetroPie/retropiemenu/gamelist.xml; fi
if [ ! -f "$HOME/RetroPie/retropiemenu/gamelist.xml" ]; then cp /opt/retropie/configs/all/emulationstation/gamelists/retropie/gamelist.xml $HOME/RetroPie/retropiemenu/gamelist.xml; fi
CONTENT1="\t<game>\n\t\t<path>./Devils-Box.sh</path>\n\t\t<name>Devils-Box</name>\n\t\t<desc>The Retro Devils Tool Box - A fully fuctional script to get even the newbies started up with ease, able to download roms and artwork to their proper places, Mugen and Sega Model 3 emulators, themes and music tools, plus much, much more.</desc>\n\t\t<image>./icons/Devils-Box.png</image>\n\t\t<releasedate>20220105T173842</releasedate>\n\t\t<developer>The Retro Devils</developer>\n\t\t<publisher>The Retro Devils</publisher>\n\t\t<genre>Devils-Box Script</genre>\n\t</game>"
C1=$(echo $CONTENT1 | sed 's/\//\\\//g')
if grep -q Devils-Box.sh "$HOME/RetroPie/retropiemenu/gamelist.xml"; then echo "gamelist.xml entry confirmed"
else
sed "/<\/gameList>/ s/.*/${C1}\n&/" $HOME/RetroPie/retropiemenu/gamelist.xml > $HOME/temp
cat $HOME/temp > $HOME/RetroPie/retropiemenu/gamelist.xml
rm -f $HOME/temp
fi
echo "FOR MORE INFO,HELP,SUGGESTIONS ETC"
echo "VISIT --RETRO DEVILS COMMUNITY-- ON FACEBOOK"
echo "OR OUR WEBSITE WWW.RETRO-DEVILS.COM"
sleep 5
echo "Emulationstation Will Now Restart ..."
sleep 1
killall emulationstation
sudo openvt -c 1 -s -f emulationstation 2>&1
}
#--------#
# INFO #
#--------#
function info() {
dialog --sleep 1 --title "DEVILS BOX INFO" --msgbox "
WHATS THIS? A DOWNLOADER AND TOOL BOX
CREATED BY? THE RETRO DEVILS AND OTHERS
CREATED WHEN? DECEMBER 2021
__FREQUENTLY ASKED QUESTIONS__
WHY EVEN MAKE THIS?
- We want everyone to enjoy alL the games. If your getting em anyway, let us make it easy.
WHAT DOES THIS WORK ON?
- This is built for things with RetroPie installed. Mainly PI 4.
- This will work on any system(s) with Retropie Installed.
--The following is needed for Devils Box to work:
-The location: ~/RetroPie/retropiemenu/ & ~/RetroPie/roms/
-The Commands: wget and curl
- The downloader will work any Retropie Device. That doesnt mean you can play all the consoles listed.
**example pi zero wont play N64.
- Most tools will only work on pi 3 or 4.
WHY USE THIS ARTWORK INSTEAD OF SCRAPER?
- This art is set for these roms. So they will look nice. Scraper works and props to it.
__CREDITS__
--EMUS AND TOOLS CREDITS:
-All emus & tools from commmunity have credits in Devils Box menus.
example. RetroPie Extras says *Zero Jay* at the far right of that line.
--MISC CREDITS:
-ALL THE RETRO DEVILS--------YOU KNOW WHAT YOU DID
-COMMUNITY-------------------INPUT IN GENERAL
-RETROPIE--------------------FOR EVERYTHING THEY DO
-CRASH-----------------------SCRIPTING KNOWLEDGE & ADVICE
-BIGED-----------------------SCRIPTING KNOWLEDGE & ADVICE
-MONK OF THE FUNK------------SCRIPTING KNOWLEDGE & ADVICE
-SOLARBABY-------------------SCRIPTING KNOWLEDGE & ADVICE
MORE INFO SEE
WWW.RETRO-DEVILS.COM OR RETRO DEVILS COMMUNITY ON FACEBOOK" 0 0
}
# Main
main_menu