From 3eabbde2fae99a2684c84fa54021882f43084601 Mon Sep 17 00:00:00 2001 From: pryme-svg Date: Tue, 27 Oct 2020 09:55:09 -0700 Subject: [PATCH 1/3] fix desktop file --- Lightcord_installer.sh | 54 ++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/Lightcord_installer.sh b/Lightcord_installer.sh index 499d6e4..521f60d 100644 --- a/Lightcord_installer.sh +++ b/Lightcord_installer.sh @@ -75,12 +75,9 @@ case $selection in wget https://raw.githubusercontent.com/Lightcord/LightcordLogos/master/lightcord/lightcord.svg; printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Moving $(pwd)/lightcord.svg file to /usr/share/pixmaps$(tput sgr0)\n"; mv lightcord.svg /usr/share/pixmaps; - printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Downloading Lightcord.desktop file to $(pwd && tput sgr0)\n"; - wget https://raw.githubusercontent.com/Lightcord/Lightcord/master/Lightcord.desktop; - printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Moving $(pwd)/Lightcord.desktop file to /usr/share/applications$(tput sgr0)\n"; - mv Lightcord.desktop /usr/share/applications; - printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Giving /usr/share/Lightcord.desktop execute permissions$(tput sgr0)\n"; - chmod +x /usr/share/applications/Lightcord.desktop; + printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Generating and moving Lightcord.desktop file to /usr/share/Lightcord.desktop$(tput sgr0)\n"; + rm -rf /usr/share/applications/Lightcord.desktop + echo -e "[Desktop Entry]\nName=Lightcord\nComment[fr_FR]=Un client Discord simple et personalisable\nComment=A simple - customizable - Discord Client\nExec=/opt/Lightcord/lightcord\nIcon=lightcord\nTerminal=false\nType=Application\nCategories=Network;InstantMessaging;P2P;" >> /usr/share/applications/Lightcord.desktop printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Cleaning up$(tput sgr0)\n"; rm -rf Lightcord.*; rm -rf Lightcord; @@ -155,25 +152,26 @@ case $selection in fi done - case $troubleshooting_selection in - 1) - printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Modifying /usr/share/applications/Lightcord.desktop$(tput sgr0)\n"; - sed -i 's/Lightcord\/Lightcord/Lightcord\/lightcord/' /usr/share/applications/Lightcord.desktop > /dev/null 2>&1; - sed -i 's/Lightcord\/Lightcord/Lightcord\/lightcord/' /home/*/.local/share/applications/Lightcord.desktop > /dev/null 2>&1; - printf "[$(tput setaf 10 && tput blink)FINISH$(tput sgr0)] Done\n"; - ;; - - 2) - printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 15)Visit the official server for support: https://discord.gg/7eFff2A$(tput sgr0)\n"; - ;; - - *) - printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 12)Exiting troubleshooting$(tput sgr0)\n"; - ;; - esac - ;; - - *) - printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 12)Exiting script$(tput sgr0)\n"; - ;; -esac +# case $troubleshooting_selection in +# 1) +# printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Modifying /usr/share/applications/Lightcord.desktop$(tput sgr0)\n"; +# sed -i 's/Lightcord\/Lightcord/Lightcord\/lightcord/' /usr/share/applications/Lightcord.desktop > /dev/null 2>&1; +# sed -i 's/Lightcord\/Lightcord/Lightcord\/lightcord/' /home/*/.local/share/applications/Lightcord.desktop > /dev/null 2>&1; +# printf "[$(tput setaf 10 && tput blink)FINISH$(tput sgr0)] Done\n"; +# ;; +# +# 2) +# printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 15)Visit the official server for support: https://discord.gg/7eFff2A$(tput sgr0)\n"; +# ;; +# +# *) +# printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 12)Exiting troubleshooting$(tput sgr0)\n"; +# ;; +# esac +# ;; +# +# *) +# printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 12)Exiting script$(tput sgr0)\n"; +# ;; +#esac + \ No newline at end of file From aced188dc13c36bff91e3eacaa7a08ee96c76c67 Mon Sep 17 00:00:00 2001 From: pryme-svg Date: Tue, 27 Oct 2020 10:03:26 -0700 Subject: [PATCH 2/3] left the troubleshooting section in there --- Lightcord_installer.sh | 50 ++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/Lightcord_installer.sh b/Lightcord_installer.sh index 521f60d..d171563 100644 --- a/Lightcord_installer.sh +++ b/Lightcord_installer.sh @@ -29,7 +29,6 @@ printf "Please select\n"; printf "1: Install Lightcord\n"; printf "2: Uninstall Lightcord\n"; printf "3: Update Lightcord\n" -printf "4: Troubleshooting\n" printf "\n"; #Repeat only if the user hasn't entered an integer... @@ -43,7 +42,6 @@ do printf "1: Install Lightcord\n"; printf "2: Uninstall Lightcord\n"; printf "3: Update Lightcord\n" - printf "4: Troubleshooting\n" printf "\n"; fi done @@ -132,26 +130,26 @@ case $selection in printf "[$(tput setaf 10 && tput blink)FINISH$(tput sgr0)] Update complete\n"; ;; - 4) - printf "Please select\n"; - printf "1: \"/opt/Lightcord/Lightcord not found\"\n"; - printf "2: None of the above\n" - printf "\n"; - - #Repeat only if the user hasn't entered an integer... - while ! [[ $troubleshooting_selection =~ ^[0-9]+$ ]]; - do - read troubleshooting_selection; - #if the entered value was not an integer, show this - if ! [[ $troubleshooting_selection =~ ^[0-9]+$ ]]; then - sleep 1; - printf "$(tput setaf 9)Please try again$(tput sgr0)\n"; - printf "1: \"/opt/Lightcord/Lightcord not found\"\n"; - printf "2: None of the above\n" - printf "\n"; - fi - done - +# 4) +# printf "Please select\n"; +# printf "1: \"/opt/Lightcord/Lightcord not found\"\n"; +# printf "2: None of the above\n" +# printf "\n"; +# +# #Repeat only if the user hasn't entered an integer... +# while ! [[ $troubleshooting_selection =~ ^[0-9]+$ ]]; +# do +# read troubleshooting_selection; +# #if the entered value was not an integer, show this +# if ! [[ $troubleshooting_selection =~ ^[0-9]+$ ]]; then +# sleep 1; +# printf "$(tput setaf 9)Please try again$(tput sgr0)\n"; +# printf "1: \"/opt/Lightcord/Lightcord not found\"\n"; +# printf "2: None of the above\n" +# printf "\n"; +# fi +# done +# # case $troubleshooting_selection in # 1) # printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Modifying /usr/share/applications/Lightcord.desktop$(tput sgr0)\n"; @@ -170,8 +168,8 @@ case $selection in # esac # ;; # -# *) -# printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 12)Exiting script$(tput sgr0)\n"; -# ;; -#esac + *) + printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 12)Exiting script$(tput sgr0)\n"; + ;; +esac \ No newline at end of file From bf6239b1168d30d611a7653ea547e2f598c1bab5 Mon Sep 17 00:00:00 2001 From: pryme-svg Date: Tue, 27 Oct 2020 10:05:36 -0700 Subject: [PATCH 3/3] forgot to make executable --- Lightcord_installer.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lightcord_installer.sh b/Lightcord_installer.sh index d171563..98ac183 100644 --- a/Lightcord_installer.sh +++ b/Lightcord_installer.sh @@ -76,6 +76,8 @@ case $selection in printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Generating and moving Lightcord.desktop file to /usr/share/Lightcord.desktop$(tput sgr0)\n"; rm -rf /usr/share/applications/Lightcord.desktop echo -e "[Desktop Entry]\nName=Lightcord\nComment[fr_FR]=Un client Discord simple et personalisable\nComment=A simple - customizable - Discord Client\nExec=/opt/Lightcord/lightcord\nIcon=lightcord\nTerminal=false\nType=Application\nCategories=Network;InstantMessaging;P2P;" >> /usr/share/applications/Lightcord.desktop + printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Giving /usr/share/Lightcord.desktop execute permissions$(tput sgr0)\n"; + chmod +x /usr/share/applications/Lightcord.desktop; printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Cleaning up$(tput sgr0)\n"; rm -rf Lightcord.*; rm -rf Lightcord;