diff --git a/Install.sh b/Install.sh index a6914d8..eb546ff 100644 --- a/Install.sh +++ b/Install.sh @@ -1,54 +1,54 @@ -#!/bin/bash - -echo -e "\n****************************************************************" -echo -e "Welcome to the Moonlight Installer Script for RetroPie" -echo -e "****************************************************************\n" -echo -e "Select an option:" -echo -e " * 1: Complete Install and Setup" -echo -e " * 2: Install Moonlight" -echo -e " * 3: Pair Moonlight to PC" -echo -e " * 4: Install Moonlight Menu in RetroPie" -echo -e " * 5: Install Moonlight Refresh Script in RetroPie" -echo -e " * 6: Install Moonlight themes" -echo -e " * 7: Remove Launch Scripts" -echo -e " * 8: Exit" - -read NUM -case $NUM in -1) -sudo bash ./Install_moonlight.sh -sudo bash ./Pair_moonlight.sh -sudo bash ./Install_moonlight_menu.sh -sudo bash ./Install_Scripts.sh -sudo bash ./Install_themes.sh -;; -2) - sudo bash ./Install_moonlight.sh - sudo bash ./Install.sh - ;; - 3) - sudo bash ./Pair_moonlight.sh - sudo bash ./Install.sh - ;; - 4) - sudo bash ./Install_moonlight_menu.sh - sudo bash ./Install.sh - ;; - 5) - sudo bash ./Install_Scripts.sh - sudo bash ./Install.sh - ;; - 6) - sudo bash ./Install_themes.sh - sudo bash ./Install.sh - ;; - 7) - echo -e "\nRemoving all Moonlight launch scripts..." - rm -rf /home/pi/RetroPie/roms/moonlight - sudo bash ./Install.sh - ;; - 8) - exit 1 - ;; - *) echo "INVALID NUMBER!" ;; +#!/bin/bash + +echo -e "\n****************************************************************" +echo -e "Welcome to the Moonlight Installer Script for RetroPie" +echo -e "****************************************************************\n" +echo -e "Select an option:" +echo -e " * 1: Complete Install and Setup" +echo -e " * 2: Install Moonlight" +echo -e " * 3: Pair Moonlight to PC" +echo -e " * 4: Install Moonlight Menu in RetroPie" +echo -e " * 5: Install Moonlight Refresh Script in RetroPie" +echo -e " * 6: Install Moonlight themes" +echo -e " * 7: Remove Launch Scripts" +echo -e " * 8: Exit" + +read NUM +case $NUM in +1) +sudo bash ./Install_moonlight.sh +sudo bash ./Pair_moonlight.sh +sudo bash ./Install_moonlight_menu.sh +sudo bash ./Install_Scripts.sh +sudo bash ./Install_themes.sh +;; +2) + sudo bash ./Install_moonlight.sh + sudo bash ./Install.sh + ;; + 3) + sudo bash ./Pair_moonlight.sh + sudo bash ./Install.sh + ;; + 4) + sudo bash ./Install_moonlight_menu.sh + sudo bash ./Install.sh + ;; + 5) + sudo bash ./Install_Scripts.sh + sudo bash ./Install.sh + ;; + 6) + sudo bash ./Install_themes.sh + sudo bash ./Install.sh + ;; + 7) + echo -e "\nRemoving all Moonlight launch scripts..." + rm -rf /home/pi/RetroPie/roms/moonlight + sudo bash ./Install.sh + ;; + 8) + exit 1 + ;; + *) echo "INVALID NUMBER!" ;; esac \ No newline at end of file diff --git a/Install_Scripts.sh b/Install_Scripts.sh index ec20e17..5c7e0f1 100644 --- a/Install_Scripts.sh +++ b/Install_Scripts.sh @@ -1,20 +1,20 @@ -#!/bin/bash - -echo -e "\nCreating Refresh script in Moonlight..." - -if [ -d /home/pi/RetroPie/roms/moonlight ] -then - rm -rf /home/pi/RetroPie/roms/moonlight -fi - -mkdir -p /home/pi/RetroPie/roms/moonlight -chmod 775 /home/pi/RetroPie/roms/moonlight -chown pi:pi /home/pi/RetroPie/roms/moonlight - -chmod -x+ Refresh.sh - -/bin/cp ./Refresh.sh /home/pi/RetroPie/roms/moonlight/Refresh.sh -/bin/cp ./GenerateGamesList.py /home/pi/RetroPie/roms/moonlight/GenerateGamesList.py - -echo -e "Refresh script has been added to RetroPie\n" -echo -e "After loading RetroPie, use the \"Refresh\" rom listed in the Moonlight system.\n" +#!/bin/bash + +echo -e "\nCreating Refresh script in Moonlight..." + +if [ -d /home/pi/RetroPie/roms/moonlight ] +then + rm -rf /home/pi/RetroPie/roms/moonlight +fi + +mkdir -p /home/pi/RetroPie/roms/moonlight +chmod 775 /home/pi/RetroPie/roms/moonlight +chown pi:pi /home/pi/RetroPie/roms/moonlight + +chmod -x+ Refresh.sh + +/bin/cp ./Refresh.sh /home/pi/RetroPie/roms/moonlight/Refresh.sh +/bin/cp ./GenerateGamesList.py /home/pi/RetroPie/roms/moonlight/GenerateGamesList.py + +echo -e "Refresh script has been added to RetroPie\n" +echo -e "After loading RetroPie, use the \"Refresh\" rom listed in the Moonlight system.\n" diff --git a/Install_moonlight.sh b/Install_moonlight.sh index 2d7f1c3..0c4b197 100644 --- a/Install_moonlight.sh +++ b/Install_moonlight.sh @@ -1,28 +1,28 @@ -#!/bin/bash - -echo -e "\nAdding Moonlight to Sources List..." - -if grep -q "deb http://archive.itimmer.nl/raspbian/moonlight jessie main" /etc/apt/sources.list; then - echo -e "NOTE: Moonlight Source Exists - Skipping" -else - echo -e "Adding Moonlight to Sources List" - echo "deb http://archive.itimmer.nl/raspbian/moonlight jessie main" >> /etc/apt/sources.list -fi - -echo -e "\nFetching and installing the GPG key....\n" - -if [ -f /home/pi/itimmer.gpg ] -then - echo -e "NOTE: GPG Key Exists - Skipping" -else - wget http://archive.itimmer.nl/itimmer.gpg - chown pi:pi /home/pi/itimmer.gpg - apt-key add itimmer.gpg -fi - -echo -e "\nUpdating System..." -apt-get update -y - -echo -e "\nInstalling Moonlight..." -apt-get install moonlight-embedded -y +#!/bin/bash + +echo -e "\nAdding Moonlight to Sources List..." + +if grep -q "deb http://archive.itimmer.nl/raspbian/moonlight jessie main" /etc/apt/sources.list; then + echo -e "NOTE: Moonlight Source Exists - Skipping" +else + echo -e "Adding Moonlight to Sources List" + echo "deb http://archive.itimmer.nl/raspbian/moonlight jessie main" >> /etc/apt/sources.list +fi + +echo -e "\nFetching and installing the GPG key....\n" + +if [ -f /home/pi/itimmer.gpg ] +then + echo -e "NOTE: GPG Key Exists - Skipping" +else + wget http://archive.itimmer.nl/itimmer.gpg + chown pi:pi /home/pi/itimmer.gpg + apt-key add itimmer.gpg +fi + +echo -e "\nUpdating System..." +apt-get update -y + +echo -e "\nInstalling Moonlight..." +apt-get install moonlight-embedded -y echo -e "\nMoonlight Installed!" \ No newline at end of file diff --git a/Install_moonlight_menu.sh b/Install_moonlight_menu.sh index 33abd24..efe7881 100644 --- a/Install_moonlight_menu.sh +++ b/Install_moonlight_menu.sh @@ -1,25 +1,20 @@ -#!/bin/bash - -echo -e "\nCreating Moonlight Menu for RetroPie..." - -CONFIG=$(<./menu_config.txt) -DIRECTORY=/home/pi/.emulationstation/es_systems.cfg - -if [ -f $DIRECTORY ] -then - echo -e "Removing Duplicate Systems File" - rm $DIRECTORY -fi - -echo -e "Copying Systems Config File" -cp /etc/emulationstation/es_systems.cfg $DIRECTORY - -if grep -q "$CONFIG" $DIRECTORY; then - echo -e "NOTE: Moonlight Entry Exists - Skipping" -else - echo -e "Adding Steam to Systems" - sed - sudo sed -i -e 's|| /r ./menu_config.txt' $DIRECTORY -fi - -echo -e "\nMoonlight menue added to RetroPie..." \ No newline at end of file +#!/bin/bash + +echo -e "\nCreating Moonlight Menu for RetroPie..." + +CONFIG=$(<./menu_config.txt) +DIRECTORY=/home/pi/.emulationstation/es_systems.cfg + +if [ -f $DIRECTORY ] +then + echo -e "Removing Duplicate Systems File" + rm $DIRECTORY +fi + +echo -e "Copying Systems Config File" +cp /etc/emulationstation/es_systems.cfg $DIRECTORY + +echo -e "Adding Moonlight to Systems" +sudo sed -i -e 's|| \n steam\n Steam\n ~/RetroPie/roms/moonlight\n .sh .SH\n bash %ROM%\n pc\n moonlight\n \n|g' $DIRECTORY + +echo -e "\nMoonlight menu added to RetroPie..." diff --git a/Install_themes.sh b/Install_themes.sh index 960d680..166e492 100644 --- a/Install_themes.sh +++ b/Install_themes.sh @@ -1,7 +1,7 @@ -#!/bin/bash - -echo -e "\nInstalling Moonlight compatible themes..." - -cp -R ./themes /etc/emulationstation/ - +#!/bin/bash + +echo -e "\nInstalling Moonlight compatible themes..." + +cp -R ./themes /etc/emulationstation/ + echo -e "\nThemes installed" \ No newline at end of file diff --git a/Pair_moonlight.sh b/Pair_moonlight.sh index 91c6111..fc4ec3d 100644 --- a/Pair_moonlight.sh +++ b/Pair_moonlight.sh @@ -1,8 +1,8 @@ -#!/bin/bash - -echo -e "\nPairing Moonlight with another PC...\n" -echo -e "Once you have input your PC's IP Address below, you will be given a PIN" -echo -e "Input this on the PC to pair with Moonlight. \n" -read -p "Input PC's IP Address here :`echo $'\n> '`" ip -sudo -u pi moonlight pair $ip +#!/bin/bash + +echo -e "\nPairing Moonlight with another PC...\n" +echo -e "Once you have input your PC's IP Address below, you will be given a PIN" +echo -e "Input this on the PC to pair with Moonlight. \n" +read -p "Input PC's IP Address here :`echo $'\n> '`" ip +sudo -u pi moonlight pair $ip echo -e "Pair Process Complete." \ No newline at end of file diff --git a/menu_config.txt b/menu_config.txt index 491a42f..b61c0df 100644 --- a/menu_config.txt +++ b/menu_config.txt @@ -1,10 +1,10 @@ - - steam - Steam - ~/RetroPie/roms/moonlight - .sh .SH - bash %ROM% - pc - moonlight - + + steam + Steam + ~/RetroPie/roms/moonlight + .sh .SH + bash %ROM% + pc + moonlight + \ No newline at end of file