From e56d1875f482fb74ca2f6a7e1050463aa012367c Mon Sep 17 00:00:00 2001 From: Party Wumpus <48649272+PartyWumpus@users.noreply.github.com> Date: Mon, 20 Mar 2023 21:39:03 +0000 Subject: Add checks to .desktop file --- gui/decky_installer.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/decky_installer.desktop b/gui/decky_installer.desktop index 2a90683..331535d 100644 --- a/gui/decky_installer.desktop +++ b/gui/decky_installer.desktop @@ -1,7 +1,7 @@ #!/usr/bin/env xdg-open [Desktop Entry] Name=Install Decky -Exec=sh -c 'curl -L -O --output-dir /tmp/ https://github.com/SteamDeckHomebrew/decky-installer/releases/latest/download/user_install_script.sh 2> /dev/null && bash /tmp/user_install_script.sh' +Exec=sh -c 'if curl -S -s -L -O --output-dir /tmp/ --connect-timeout 15 https://github.com/SteamDeckHomebrew/decky-installer/releases/latest/download/user_install_script.sh; then bash /tmp/user_install_script.sh; else echo "Something went wrong, please report this bug"; read; fi' Icon=steamdeck-gaming-return Terminal=true Type=Application -- cgit v1.2.3 From fe89c471338a8625c3f86763ce79838916b1e38c Mon Sep 17 00:00:00 2001 From: Party Wumpus <48649272+PartyWumpus@users.noreply.github.com> Date: Mon, 20 Mar 2023 21:41:13 +0000 Subject: Update decky_installer.desktop --- gui/decky_installer.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/decky_installer.desktop b/gui/decky_installer.desktop index 331535d..7a3c6b6 100644 --- a/gui/decky_installer.desktop +++ b/gui/decky_installer.desktop @@ -1,7 +1,7 @@ #!/usr/bin/env xdg-open [Desktop Entry] Name=Install Decky -Exec=sh -c 'if curl -S -s -L -O --output-dir /tmp/ --connect-timeout 15 https://github.com/SteamDeckHomebrew/decky-installer/releases/latest/download/user_install_script.sh; then bash /tmp/user_install_script.sh; else echo "Something went wrong, please report this bug"; read; fi' +Exec=sh -c 'if curl -S -s -L -O --output-dir /tmp/ --connect-timeout 15 https://github.com/SteamDeckHomebrew/decky-installer/releases/latest/download/user_install_script.sh; then bash /tmp/user_install_script.sh; else echo "Something went wrong, please report this if it is a bug"; read; fi' Icon=steamdeck-gaming-return Terminal=true Type=Application -- cgit v1.2.3 From 4eb24eed9de7f1077a101e699be0270efa3eac16 Mon Sep 17 00:00:00 2001 From: Party Wumpus <48649272+PartyWumpus@users.noreply.github.com> Date: Mon, 20 Mar 2023 21:50:33 +0000 Subject: remove GTK errors and re-add useful errors --- gui/user_install_script.sh | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/gui/user_install_script.sh b/gui/user_install_script.sh index c12e1fb..c5be17c 100644 --- a/gui/user_install_script.sh +++ b/gui/user_install_script.sh @@ -5,6 +5,11 @@ temp_pass_cleanup() { echo $PASS | sudo -S -k passwd -d deck } +# removes unhelpful GTK warnings +zen_nospam() { + zenity 2> >(grep -v 'GtkDialog' >&2) "$@" +} + # check if JQ is installed if ! command -v jq &> /dev/null then @@ -21,7 +26,7 @@ if (( $EUID != 0 )); then fi if [ "${PASS_STATUS:5:2}" = "NP" ]; then # if no password is set - if ( zenity --title="Decky Installer" --width=300 --height=200 --question --text="You appear to have not set an admin password.\nDecky can still install by temporarily setting your password to 'Decky!' and continuing, then removing it when the installer finishes\nAre you okay with that?" ); then + if ( zen_nospam --title="Decky Installer" --width=300 --height=200 --question --text="You appear to have not set an admin password.\nDecky can still install by temporarily setting your password to 'Decky!' and continuing, then removing it when the installer finishes\nAre you okay with that?" ); then yes "Decky!" | passwd deck trap temp_pass_cleanup EXIT # make sure password is removed when application closes PASS="Decky!" @@ -30,24 +35,24 @@ if (( $EUID != 0 )); then # get password FINISHED="false" while [ "$FINISHED" != "true" ]; do - PASS=$(zenity --title="Decky Installer" --width=300 --height=100 --entry --hide-text --text="Enter your sudo/admin password") + PASS=$(zen_nospam --title="Decky Installer" --width=300 --height=100 --entry --hide-text --text="Enter your sudo/admin password") if [[ $? -eq 1 ]] || [[ $? -eq 5 ]]; then exit 1 fi if ( echo "$PASS" | sudo -S -k true ); then FINISHED="true" else - zenity --title="Decky Installer" --width=150 --height=40 --info --text "Incorrect Password" + zen_nospam --title="Decky Installer" --width=150 --height=40 --info --text "Incorrect Password" fi done fi if ! [ $USER = "deck" ]; then - zenity --title="Decky Installer" --width=300 --height=100 --warning --text "You appear to not be on a deck.\nDecky should still mostly work, but you may not get full functionality." + zen_nospam --title="Decky Installer" --width=300 --height=100 --warning --text "You appear to not be on a deck.\nDecky should still mostly work, but you may not get full functionality." fi # get user dir before rerunning as root, otherwise it'll just be 'home/root' - + echo "$PASS" | sudo -S -k bash "$0" "$@" # rerun script as root exit 1 fi @@ -58,9 +63,9 @@ HOMEBREW_FOLDER="${USER_DIR}/homebrew" # if decky is already installed, then also add an 'uninstall' prompt if [[ -f "${USER_DIR}/homebrew/services/PluginLoader" ]] ; then - BRANCH=$(zenity --title="Decky Installer" --width=360 --height=170 --list --radiolist --text "Select Option:" --hide-header --column "Buttons" --column "Choice" --column "Info" TRUE "release" "(Recommended option)" FALSE "prerelease" "(May be unstable)" FALSE "uninstall decky loader" "") + BRANCH=$(zen_nospam --title="Decky Installer" --width=360 --height=170 --list --radiolist --text "Select Option:" --hide-header --column "Buttons" --column "Choice" --column "Info" TRUE "release" "(Recommended option)" FALSE "prerelease" "(May be unstable)" FALSE "uninstall decky loader" "") else - BRANCH=$(zenity --title="Decky Installer" --width=300 --height=100 --list --radiolist --text "Select Branch:" --hide-header --column "Buttons" --column "Choice" --column "Info" TRUE "release" "(Recommended option)" FALSE "prerelease" "(May be unstable)" ) + BRANCH=$(zen_nospam --title="Decky Installer" --width=300 --height=100 --list --radiolist --text "Select Branch:" --hide-header --column "Buttons" --column "Choice" --column "Info" TRUE "release" "(Recommended option)" FALSE "prerelease" "(May be unstable)" ) fi if [[ $? -eq 1 ]] || [[ $? -eq 5 ]]; then exit 1 @@ -86,7 +91,7 @@ if [ "$BRANCH" == "uninstall decky loader" ] ; then echo "100" ; echo "# Uninstall finished, installer can now be closed"; ) | - zenity --progress \ + zen_nospam --progress \ --title="Decky Installer" \ --width=300 --height=100 \ --text="Uninstalling..." \ @@ -113,15 +118,15 @@ VERSION=$(jq -r '.tag_name' <<< ${RELEASE} ) DOWNLOADURL=$(jq -r '.assets[].browser_download_url | select(endswith("PluginLoader"))' <<< ${RELEASE}) echo "45" ; echo "# Installing version $VERSION" ; -curl -L $DOWNLOADURL -o ${HOMEBREW_FOLDER}/services/PluginLoader 2>&1 | stdbuf -oL tr '\r' '\n' | sed -u 's/^ *\([0-9][0-9]*\).*\( [0-9].*$\)/\1\n#Download Speed\:\2/' | zenity --progress --title "Downloading Decky" --text="Download Speed: 0" --width=300 --height=100 --auto-close --no-cancel 2>/dev/null +curl -L $DOWNLOADURL -o ${HOMEBREW_FOLDER}/services/PluginLoader 2>&1 | stdbuf -oL tr '\r' '\n' | sed -u 's/^ *\([0-9][0-9]*\).*\( [0-9].*$\)/\1\n#Download Speed\:\2/' | zen_nospam --progress --title "Downloading Decky" --text="Download Speed: 0" --width=300 --height=100 --auto-close --no-cancel chmod +x ${HOMEBREW_FOLDER}/services/PluginLoader echo $VERSION > ${HOMEBREW_FOLDER}/services/.loader.version echo "70" ; echo "# Kiling plugin_loader if it exists" ; -systemctl --user stop plugin_loader 2> /dev/null -systemctl --user disable plugin_loader 2> /dev/null -systemctl stop plugin_loader 2> /dev/null -systemctl disable plugin_loader 2> /dev/null +systemctl --user stop plugin_loader +systemctl --user disable plugin_loader +systemctl stop plugin_loader +systemctl disable plugin_loader echo "85" ; echo "# Setting up systemd" ; curl -L https://raw.githubusercontent.com/SteamDeckHomebrew/decky-loader/main/dist/plugin_loader-${BRANCH}.service --output ${HOMEBREW_FOLDER}/services/plugin_loader-${BRANCH}.service @@ -172,7 +177,7 @@ fi echo "100" ; echo "# Install finished, installer can now be closed"; ) | -zenity --progress \ +zen_nospam --progress \ --title="Decky Installer" \ --width=300 --height=100 \ --text="Installing..." \ @@ -180,5 +185,5 @@ zenity --progress \ --no-cancel # not actually sure how to make the cancel work properly, so it's just not there unless someone else can figure it out if [ "$?" = -1 ] ; then - zenity --title="Decky Installer" --width=150 --height=70 --error --text="Download interrupted." + zen_nospam --title="Decky Installer" --width=150 --height=70 --error --text="Download interrupted." fi -- cgit v1.2.3 From a93adc06d9eb208e7dc2e5ceac04b71674e52584 Mon Sep 17 00:00:00 2001 From: Party Wumpus <48649272+PartyWumpus@users.noreply.github.com> Date: Mon, 20 Mar 2023 21:55:30 +0000 Subject: gtk please be quiet --- gui/user_install_script.sh | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/gui/user_install_script.sh b/gui/user_install_script.sh index c5be17c..f89c26e 100644 --- a/gui/user_install_script.sh +++ b/gui/user_install_script.sh @@ -5,10 +5,6 @@ temp_pass_cleanup() { echo $PASS | sudo -S -k passwd -d deck } -# removes unhelpful GTK warnings -zen_nospam() { - zenity 2> >(grep -v 'GtkDialog' >&2) "$@" -} # check if JQ is installed if ! command -v jq &> /dev/null @@ -26,7 +22,7 @@ if (( $EUID != 0 )); then fi if [ "${PASS_STATUS:5:2}" = "NP" ]; then # if no password is set - if ( zen_nospam --title="Decky Installer" --width=300 --height=200 --question --text="You appear to have not set an admin password.\nDecky can still install by temporarily setting your password to 'Decky!' and continuing, then removing it when the installer finishes\nAre you okay with that?" ); then + if ( zenity --title="Decky Installer" --width=300 --height=200 --question --text="You appear to have not set an admin password.\nDecky can still install by temporarily setting your password to 'Decky!' and continuing, then removing it when the installer finishes\nAre you okay with that?" 2> >(grep -v GtkDialog >&2)); then yes "Decky!" | passwd deck trap temp_pass_cleanup EXIT # make sure password is removed when application closes PASS="Decky!" @@ -35,20 +31,20 @@ if (( $EUID != 0 )); then # get password FINISHED="false" while [ "$FINISHED" != "true" ]; do - PASS=$(zen_nospam --title="Decky Installer" --width=300 --height=100 --entry --hide-text --text="Enter your sudo/admin password") + PASS=$(zenity --title="Decky Installer" --width=300 --height=100 --entry --hide-text --text="Enter your sudo/admin password" 2> >(grep -v GtkDialog >&2)) if [[ $? -eq 1 ]] || [[ $? -eq 5 ]]; then exit 1 fi if ( echo "$PASS" | sudo -S -k true ); then FINISHED="true" else - zen_nospam --title="Decky Installer" --width=150 --height=40 --info --text "Incorrect Password" + zenity --title="Decky Installer" --width=150 --height=40 --info --text "Incorrect Password" 2> >(grep -v GtkDialog >&2) fi done fi if ! [ $USER = "deck" ]; then - zen_nospam --title="Decky Installer" --width=300 --height=100 --warning --text "You appear to not be on a deck.\nDecky should still mostly work, but you may not get full functionality." + zenity --title="Decky Installer" --width=300 --height=100 --warning --text "You appear to not be on a deck.\nDecky should still mostly work, but you may not get full functionality." 2> >(grep -v GtkDialog >&2) fi # get user dir before rerunning as root, otherwise it'll just be 'home/root' @@ -63,9 +59,9 @@ HOMEBREW_FOLDER="${USER_DIR}/homebrew" # if decky is already installed, then also add an 'uninstall' prompt if [[ -f "${USER_DIR}/homebrew/services/PluginLoader" ]] ; then - BRANCH=$(zen_nospam --title="Decky Installer" --width=360 --height=170 --list --radiolist --text "Select Option:" --hide-header --column "Buttons" --column "Choice" --column "Info" TRUE "release" "(Recommended option)" FALSE "prerelease" "(May be unstable)" FALSE "uninstall decky loader" "") + BRANCH=$(zenity --title="Decky Installer" --width=360 --height=170 --list --radiolist --text "Select Option:" --hide-header --column "Buttons" --column "Choice" --column "Info" TRUE "release" "(Recommended option)" FALSE "prerelease" "(May be unstable)" FALSE "uninstall decky loader" "" 2> >(grep -v GtkDialog >&2)) else - BRANCH=$(zen_nospam --title="Decky Installer" --width=300 --height=100 --list --radiolist --text "Select Branch:" --hide-header --column "Buttons" --column "Choice" --column "Info" TRUE "release" "(Recommended option)" FALSE "prerelease" "(May be unstable)" ) + BRANCH=$(zenity --title="Decky Installer" --width=300 --height=100 --list --radiolist --text "Select Branch:" --hide-header --column "Buttons" --column "Choice" --column "Info" TRUE "release" "(Recommended option)" FALSE "prerelease" "(May be unstable)" 2> >(grep -v GtkDialog >&2)) fi if [[ $? -eq 1 ]] || [[ $? -eq 5 ]]; then exit 1 @@ -91,12 +87,12 @@ if [ "$BRANCH" == "uninstall decky loader" ] ; then echo "100" ; echo "# Uninstall finished, installer can now be closed"; ) | - zen_nospam --progress \ + zenity --progress \ --title="Decky Installer" \ --width=300 --height=100 \ --text="Uninstalling..." \ --percentage=0 \ - --no-cancel + --no-cancel 2> >(grep -v GtkDialog >&2) exit 1 fi @@ -118,7 +114,7 @@ VERSION=$(jq -r '.tag_name' <<< ${RELEASE} ) DOWNLOADURL=$(jq -r '.assets[].browser_download_url | select(endswith("PluginLoader"))' <<< ${RELEASE}) echo "45" ; echo "# Installing version $VERSION" ; -curl -L $DOWNLOADURL -o ${HOMEBREW_FOLDER}/services/PluginLoader 2>&1 | stdbuf -oL tr '\r' '\n' | sed -u 's/^ *\([0-9][0-9]*\).*\( [0-9].*$\)/\1\n#Download Speed\:\2/' | zen_nospam --progress --title "Downloading Decky" --text="Download Speed: 0" --width=300 --height=100 --auto-close --no-cancel +curl -L $DOWNLOADURL -o ${HOMEBREW_FOLDER}/services/PluginLoader 2>&1 | stdbuf -oL tr '\r' '\n' | sed -u 's/^ *\([0-9][0-9]*\).*\( [0-9].*$\)/\1\n#Download Speed\:\2/' | zenity --progress --title "Downloading Decky" --text="Download Speed: 0" --width=300 --height=100 --auto-close --no-cancel 2> >(grep -v GtkDialog >&2) chmod +x ${HOMEBREW_FOLDER}/services/PluginLoader echo $VERSION > ${HOMEBREW_FOLDER}/services/.loader.version @@ -177,13 +173,14 @@ fi echo "100" ; echo "# Install finished, installer can now be closed"; ) | -zen_nospam --progress \ +zenity --progress \ --title="Decky Installer" \ --width=300 --height=100 \ --text="Installing..." \ --percentage=0 \ - --no-cancel # not actually sure how to make the cancel work properly, so it's just not there unless someone else can figure it out + --no-cancel \ # not actually sure how to make the cancel work properly, so it's just not there unless someone else can figure it out + 2> >(grep -v GtkDialog >&2) if [ "$?" = -1 ] ; then - zen_nospam --title="Decky Installer" --width=150 --height=70 --error --text="Download interrupted." + zenity --title="Decky Installer" --width=150 --height=70 --error --text="Download interrupted." 2> >(grep -v GtkDialog >&2) fi -- cgit v1.2.3 From 0ecd667f7e086208d08570612c9e97a21fa69512 Mon Sep 17 00:00:00 2001 From: Party Wumpus <48649272+PartyWumpus@users.noreply.github.com> Date: Mon, 20 Mar 2023 21:59:23 +0000 Subject: The first thing I tried worked, there was just a typo --- gui/user_install_script.sh | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/gui/user_install_script.sh b/gui/user_install_script.sh index f89c26e..acc3c5d 100644 --- a/gui/user_install_script.sh +++ b/gui/user_install_script.sh @@ -5,6 +5,10 @@ temp_pass_cleanup() { echo $PASS | sudo -S -k passwd -d deck } +# removes unhelpful GTK warnings +zen_nospam() { + zenity 2> >(grep -v 'Gtk' >&2) "$@" +} # check if JQ is installed if ! command -v jq &> /dev/null @@ -22,7 +26,7 @@ if (( $EUID != 0 )); then fi if [ "${PASS_STATUS:5:2}" = "NP" ]; then # if no password is set - if ( zenity --title="Decky Installer" --width=300 --height=200 --question --text="You appear to have not set an admin password.\nDecky can still install by temporarily setting your password to 'Decky!' and continuing, then removing it when the installer finishes\nAre you okay with that?" 2> >(grep -v GtkDialog >&2)); then + if ( zen_nospam --title="Decky Installer" --width=300 --height=200 --question --text="You appear to have not set an admin password.\nDecky can still install by temporarily setting your password to 'Decky!' and continuing, then removing it when the installer finishes\nAre you okay with that?" ); then yes "Decky!" | passwd deck trap temp_pass_cleanup EXIT # make sure password is removed when application closes PASS="Decky!" @@ -31,20 +35,20 @@ if (( $EUID != 0 )); then # get password FINISHED="false" while [ "$FINISHED" != "true" ]; do - PASS=$(zenity --title="Decky Installer" --width=300 --height=100 --entry --hide-text --text="Enter your sudo/admin password" 2> >(grep -v GtkDialog >&2)) + PASS=$(zen_nospam --title="Decky Installer" --width=300 --height=100 --entry --hide-text --text="Enter your sudo/admin password") if [[ $? -eq 1 ]] || [[ $? -eq 5 ]]; then exit 1 fi if ( echo "$PASS" | sudo -S -k true ); then FINISHED="true" else - zenity --title="Decky Installer" --width=150 --height=40 --info --text "Incorrect Password" 2> >(grep -v GtkDialog >&2) + zen_nospam --title="Decky Installer" --width=150 --height=40 --info --text "Incorrect Password" fi done fi if ! [ $USER = "deck" ]; then - zenity --title="Decky Installer" --width=300 --height=100 --warning --text "You appear to not be on a deck.\nDecky should still mostly work, but you may not get full functionality." 2> >(grep -v GtkDialog >&2) + zen_nospam --title="Decky Installer" --width=300 --height=100 --warning --text "You appear to not be on a deck.\nDecky should still mostly work, but you may not get full functionality." fi # get user dir before rerunning as root, otherwise it'll just be 'home/root' @@ -59,9 +63,9 @@ HOMEBREW_FOLDER="${USER_DIR}/homebrew" # if decky is already installed, then also add an 'uninstall' prompt if [[ -f "${USER_DIR}/homebrew/services/PluginLoader" ]] ; then - BRANCH=$(zenity --title="Decky Installer" --width=360 --height=170 --list --radiolist --text "Select Option:" --hide-header --column "Buttons" --column "Choice" --column "Info" TRUE "release" "(Recommended option)" FALSE "prerelease" "(May be unstable)" FALSE "uninstall decky loader" "" 2> >(grep -v GtkDialog >&2)) + BRANCH=$(zen_nospam --title="Decky Installer" --width=360 --height=170 --list --radiolist --text "Select Option:" --hide-header --column "Buttons" --column "Choice" --column "Info" TRUE "release" "(Recommended option)" FALSE "prerelease" "(May be unstable)" FALSE "uninstall decky loader" "") else - BRANCH=$(zenity --title="Decky Installer" --width=300 --height=100 --list --radiolist --text "Select Branch:" --hide-header --column "Buttons" --column "Choice" --column "Info" TRUE "release" "(Recommended option)" FALSE "prerelease" "(May be unstable)" 2> >(grep -v GtkDialog >&2)) + BRANCH=$(zen_nospam --title="Decky Installer" --width=300 --height=100 --list --radiolist --text "Select Branch:" --hide-header --column "Buttons" --column "Choice" --column "Info" TRUE "release" "(Recommended option)" FALSE "prerelease" "(May be unstable)" ) fi if [[ $? -eq 1 ]] || [[ $? -eq 5 ]]; then exit 1 @@ -87,12 +91,12 @@ if [ "$BRANCH" == "uninstall decky loader" ] ; then echo "100" ; echo "# Uninstall finished, installer can now be closed"; ) | - zenity --progress \ + zen_nospam --progress \ --title="Decky Installer" \ --width=300 --height=100 \ --text="Uninstalling..." \ --percentage=0 \ - --no-cancel 2> >(grep -v GtkDialog >&2) + --no-cancel exit 1 fi @@ -114,7 +118,7 @@ VERSION=$(jq -r '.tag_name' <<< ${RELEASE} ) DOWNLOADURL=$(jq -r '.assets[].browser_download_url | select(endswith("PluginLoader"))' <<< ${RELEASE}) echo "45" ; echo "# Installing version $VERSION" ; -curl -L $DOWNLOADURL -o ${HOMEBREW_FOLDER}/services/PluginLoader 2>&1 | stdbuf -oL tr '\r' '\n' | sed -u 's/^ *\([0-9][0-9]*\).*\( [0-9].*$\)/\1\n#Download Speed\:\2/' | zenity --progress --title "Downloading Decky" --text="Download Speed: 0" --width=300 --height=100 --auto-close --no-cancel 2> >(grep -v GtkDialog >&2) +curl -L $DOWNLOADURL -o ${HOMEBREW_FOLDER}/services/PluginLoader 2>&1 | stdbuf -oL tr '\r' '\n' | sed -u 's/^ *\([0-9][0-9]*\).*\( [0-9].*$\)/\1\n#Download Speed\:\2/' | zen_nospam --progress --title "Downloading Decky" --text="Download Speed: 0" --width=300 --height=100 --auto-close --no-cancel chmod +x ${HOMEBREW_FOLDER}/services/PluginLoader echo $VERSION > ${HOMEBREW_FOLDER}/services/.loader.version @@ -173,14 +177,13 @@ fi echo "100" ; echo "# Install finished, installer can now be closed"; ) | -zenity --progress \ +zen_nospam --progress \ --title="Decky Installer" \ --width=300 --height=100 \ --text="Installing..." \ --percentage=0 \ - --no-cancel \ # not actually sure how to make the cancel work properly, so it's just not there unless someone else can figure it out - 2> >(grep -v GtkDialog >&2) + --no-cancel # not actually sure how to make the cancel work properly, so it's just not there unless someone else can figure it out if [ "$?" = -1 ] ; then - zenity --title="Decky Installer" --width=150 --height=70 --error --text="Download interrupted." 2> >(grep -v GtkDialog >&2) + zen_nospam --title="Decky Installer" --width=150 --height=70 --error --text="Download interrupted." fi -- cgit v1.2.3 From 0045320b927887ead526ed0a2e78e4b56f5e1a12 Mon Sep 17 00:00:00 2001 From: Party Wumpus <48649272+PartyWumpus@users.noreply.github.com> Date: Mon, 20 Mar 2023 22:14:12 +0000 Subject: prerelease check for github connection --- cli/install_prerelease.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cli/install_prerelease.sh b/cli/install_prerelease.sh index aae66dc..9c2c2ab 100644 --- a/cli/install_prerelease.sh +++ b/cli/install_prerelease.sh @@ -10,6 +10,13 @@ then exit fi +# check if github.com is reachable +if ! curl -Is https://github.com | head -1 | grep 200 > /dev/null +then + echo "Github appears to be unreachable, you may not be connected to the internet" + exit 1 +fi + echo "Installing Steam Deck Plugin Loader pre-release..." USER_DIR="$(getent passwd $SUDO_USER | cut -d: -f6)" -- cgit v1.2.3 From 17740d066589cdc61167c46c83ec22650f09c6af Mon Sep 17 00:00:00 2001 From: Party Wumpus <48649272+PartyWumpus@users.noreply.github.com> Date: Mon, 20 Mar 2023 22:14:24 +0000 Subject: Update install_release.sh --- cli/install_release.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cli/install_release.sh b/cli/install_release.sh index 54be30d..ba1a82f 100644 --- a/cli/install_release.sh +++ b/cli/install_release.sh @@ -10,6 +10,13 @@ then exit fi +# check if github.com is reachable +if ! curl -Is https://github.com | head -1 | grep 200 > /dev/null +then + echo "Github appears to be unreachable, you may not be connected to the internet" + exit 1 +fi + echo "Installing Steam Deck Plugin Loader release..." USER_DIR="$(getent passwd $SUDO_USER | cut -d: -f6)" -- cgit v1.2.3 From 7abed7fcd9da5d1234e0d1b27feffd4d795f731e Mon Sep 17 00:00:00 2001 From: Party Wumpus <48649272+PartyWumpus@users.noreply.github.com> Date: Mon, 20 Mar 2023 22:17:12 +0000 Subject: Update user_install_script.sh --- gui/user_install_script.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gui/user_install_script.sh b/gui/user_install_script.sh index acc3c5d..046deb8 100644 --- a/gui/user_install_script.sh +++ b/gui/user_install_script.sh @@ -18,6 +18,13 @@ then exit fi +# check if github.com is reachable +if ! curl -Is https://github.com | head -1 | grep 200 > /dev/null +then + echo "Github appears to be unreachable, you may not be connected to the internet" + exit 1 +fi + # if the script is not root yet, get the password and rerun as root if (( $EUID != 0 )); then PASS_STATUS=$(passwd -S deck 2> /dev/null) -- cgit v1.2.3