summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParty Wumpus <48649272+PartyWumpus@users.noreply.github.com>2023-03-18 21:30:49 +0000
committerGitHub <noreply@github.com>2023-03-18 21:30:49 +0000
commit74535873e519458af12d9f6e9b547e1e1fbe3b29 (patch)
tree1d24de7dae9a3ce4601ea91d4e17fa8ce5ad05a6
parent976f5b57d99dbb5259d9e241006b8c19899559ab (diff)
parentc6eac24487c264942fd6ed3642da3fe271f1a59b (diff)
downloaddecky-installer-74535873e519458af12d9f6e9b547e1e1fbe3b29.tar.gz
decky-installer-74535873e519458af12d9f6e9b547e1e1fbe3b29.zip
Merge pull request #6 from SteamDeckHomebrew/PartyWumpus-patch-1v1.4.2
Add JQ check
-rw-r--r--cli/install_prerelease.sh8
-rw-r--r--cli/install_release.sh8
-rw-r--r--gui/user_install_script.sh8
3 files changed, 24 insertions, 0 deletions
diff --git a/cli/install_prerelease.sh b/cli/install_prerelease.sh
index 1713357..aae66dc 100644
--- a/cli/install_prerelease.sh
+++ b/cli/install_prerelease.sh
@@ -2,6 +2,14 @@
[ "$UID" -eq 0 ] || exec sudo "$0" "$@"
+# check if JQ is installed
+if ! command -v jq &> /dev/null
+then
+ echo "JQ could not be found, please install it"
+ echo "Info on how to install it can be found at https://stedolan.github.io/jq/download/"
+ exit
+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 71d2415..54be30d 100644
--- a/cli/install_release.sh
+++ b/cli/install_release.sh
@@ -2,6 +2,14 @@
[ "$UID" -eq 0 ] || exec sudo "$0" "$@"
+# check if JQ is installed
+if ! command -v jq &> /dev/null
+then
+ echo "JQ could not be found, please install it"
+ echo "Info on how to install it can be found at https://stedolan.github.io/jq/download/"
+ exit
+fi
+
echo "Installing Steam Deck Plugin Loader release..."
USER_DIR="$(getent passwd $SUDO_USER | cut -d: -f6)"
diff --git a/gui/user_install_script.sh b/gui/user_install_script.sh
index e4e0868..c12e1fb 100644
--- a/gui/user_install_script.sh
+++ b/gui/user_install_script.sh
@@ -5,6 +5,14 @@ temp_pass_cleanup() {
echo $PASS | sudo -S -k passwd -d deck
}
+# check if JQ is installed
+if ! command -v jq &> /dev/null
+then
+ echo "JQ could not be found, please install it"
+ echo "Info on how to install it can be found at https://stedolan.github.io/jq/download/"
+ exit
+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)