-
-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathinstall.sh
More file actions
38 lines (33 loc) · 1.21 KB
/
install.sh
File metadata and controls
38 lines (33 loc) · 1.21 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
#!/usr/bin/env bash
# install.sh
##############
# A bash script to perform the following tasks:
# - check if the old "RetroPie-input-selection" scheme is installed and
# uninstall it if true.
# - compile jslist.c and put the executable in
# /opt/retropie/supplementary/ directory.
# - put joystick_selection.sh in $HOME/RetroPie/retropiemenu/ directory.
#
# TODO:
# - edit the
# /opt/retropie/configs/all/emulationstation/gamelists/retropie/gamelist.xml
# to add an joystick_selection.sh description
#
rm -f \
"$HOME/bin/jslist" \
"$HOME/bin/input_selection.sh" \
"$HOME/RetroPie/retropiemenu/input_selection.sh"
rmdir "$HOME/bin" 2>/dev/null
echo -n "Compiling \"jslist.c\" and putting it in \"/opt/retropie/supplementary/\"..."
sudo gcc jslist.c \
-o "/opt/retropie/supplementary/jslist" $(sdl2-config --cflags --libs) || {
echo -e "\nSomething wrong with the compilation process. Aborting..."
exit 1
}
echo " OK!"
echo -n "Putting \"joystick_selection.sh\" in \"$HOME/RetroPie/retropiemenu/\"..."
cp joystick_selection.sh "$HOME/RetroPie/retropiemenu/joystick_selection.sh" || {
echo -e "\nUnable to put \"joystick_selection.sh\" in \"$HOME/RetroPie/retropiemenu/\". Aborting."
exit 1
}
echo " OK!"