Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- infobox= ""
- infobox="${infobox}_______________________________________________________\n\n"
- infobox="${infobox}\n"
- infobox="${infobox}Video Launching Utility\n\n"
- infobox="${infobox}\n"
- infobox="${infobox}This script will enable or disable the system launching videos.\n"
- infobox="${infobox}\n"
- infobox="${infobox}\n\n"
- dialog --backtitle "RetroPie System Launching Videos" \
- --title "RetroPie System Launching Videos" \
- --msgbox "${infobox}" 20 70
- function main_menu() {
- local choice
- while true; do
- choice=$(dialog --backtitle "$BACKTITLE" --title " MAIN MENU " \
- --ok-label OK --cancel-label Exit \
- --menu "What action would you like to perform?" 25 75 20 \
- 1 "Disable system launching videos" \
- 2 "Enable system launching videos" \
- 2>&1 > /dev/tty)
- case "$choice" in
- 1) disable_script ;;
- 2) enable_script ;;
- *) break ;;
- esac
- done
- }
- function disable_script() {
- dialog --infobox "...processing..." 3 20 ; sleep 2
- perl -pi -w -e 's/enablevideolaunch=\"true\"/enablevideolaunch=\"false\"/g;' /opt/retropie/configs/all/runcommand-onstart.sh
- sleep 2
- }
- function enable_script() {
- dialog --infobox "...processing..." 3 20 ; sleep 2
- perl -pi -w -e 's/enablevideolaunch=\"false\"/enablevideolaunch=\"true\"/g;' /opt/retropie/configs/all/runcommand-onstart.sh
- sleep 2
- }
- main_menu
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement