Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # change_es_systems.sh
- #############
- # This script lets you change the es_systems.cfg file used to display systems using your controllers.
- #
- # v4
- # TMNTturtlguy - July 9 2017
- #
- # place script in /home/pi/RetroPie/retropiemenu/
- # In order to run the script you must create the following folders:
- # /opt/retropie/configs/all/emulationstation/es_systems
- # Then within that folder create these 6 folders:
- # All
- # Consoles
- # Customs
- # Favorites
- # Hacks
- # Neocapcom
- # Example of the full path: /opt/retropie/configs/all/emulationstation/es_systems/Favorites
- # Within each folder you have created place a es_systems.cfg file. The file needs to be named the same in each folder, but the systems can be different.
- # Restart EmulationStation and the script is located in the retropie menu
- # Special Thanks to @meleu and @cyperghost for their hard work helping trouble shoot this script and comming up with a way to restart ES.
- #
- #
- #scirpt welcome screen
- dialog --backtitle "W A R N I N G !" --title " WARNING! " \
- --yesno "\nThis script lets you change your es_systems.cfg file used to display systems. This will not change or remove any systems or content, it will change which systems are displayed based on user created es_systems.cfg files. ES will automatically restart.\n\n\nDo you want to proceed?" \
- 15 75 2>&1 > /dev/tty \
- || exit
- function restart_es() {
- touch /tmp/es-restart && pkill -f "/opt/retropie/supplementary/.*/emulationstation([^.]|$)"
- exit
- }
- function main_menu() {
- local choice
- while true; do
- choice=$(dialog --backtitle "$BACKTITLE" --title " MAIN MENU " \
- --ok-label OK --cancel-label Exit \
- --menu "What do you want to do?" 17 75 10 \
- B "Run roms from NAS" \
- E "Run roms from SD/USB" \
- 2>&1 > /dev/tty)
- case "$choice" in
- B) change_to_nas ;;
- E) change_to_sd ;;
- *) break ;;
- esac
- done
- }
- function change_to_nas() {
- rm /opt/retropie/configs/all/emulationstation/es_systems.cfg
- cp /opt/retropie/configs/all/emulationstation/es_systems/NAS/es_systems.cfg /opt/retropie/configs/all/emulationstation/
- restart_es
- }
- function change_to_sd() {
- rm /opt/retropie/configs/all/emulationstation/es_systems.cfg
- cp /opt/retropie/configs/all/emulationstation/es_systems/SD/es_systems.cfg /opt/retropie/configs/all/emulationstation/
- restart_es
- }
- # START HERE #################################################################
- main_menu
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement