diff options
| -rw-r--r-- | cli/install_prerelease.sh | 7 | ||||
| -rw-r--r-- | cli/install_release.sh | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/cli/install_prerelease.sh b/cli/install_prerelease.sh index 5d6ff5d..b232906 100644 --- a/cli/install_prerelease.sh +++ b/cli/install_prerelease.sh @@ -17,6 +17,13 @@ then exit 1 fi +# check if api.github.com is working(not rate-limited) +if ! curl -Is https://api.github.com/repos/SteamDeckHomebrew/decky-loader/releases | head -1 | grep 200 > /dev/null +then + echo "Your network have problems accessing Github Api(probably rate-limited), please wait for a while and try again." + exit 1 +fi + echo "Installing Steam Deck Plugin Loader pre-release..." USER_DIR="$(getent passwd $SUDO_USER | cut -d: -f6)" diff --git a/cli/install_release.sh b/cli/install_release.sh index bbe15fb..6077a58 100644 --- a/cli/install_release.sh +++ b/cli/install_release.sh @@ -17,6 +17,13 @@ then exit 1 fi +# check if api.github.com is working(not rate-limited) +if ! curl -Is https://api.github.com/repos/SteamDeckHomebrew/decky-loader/releases | head -1 | grep 200 > /dev/null +then + echo "Your network have problems accessing Github Api(probably rate-limited), please wait for a while and try again." + exit 1 +fi + echo "Installing Steam Deck Plugin Loader release..." USER_DIR="$(getent passwd $SUDO_USER | cut -d: -f6)" |
