From 1481b3d415c7e4733fdf6bd149ceb7a520c70c05 Mon Sep 17 00:00:00 2001 From: osiris <12292530+osir@users.noreply.github.com> Date: Wed, 12 Oct 2022 01:55:12 +0200 Subject: [PATCH] Add quotes around variable to handle empty value (#145) When $1 is empty, the script prints an error since it expands to `if [ = '--tweaks' ]`. --- palera1n.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/palera1n.sh b/palera1n.sh index b08a173..f6d90a4 100755 --- a/palera1n.sh +++ b/palera1n.sh @@ -576,7 +576,7 @@ if [ "$os" = 'Darwin' ]; then fi fi -if [ $1 = '--tweaks' ] && [ ! -f ".tweaksinstalled" ]; then +if [ "$1" = '--tweaks' ] && [ ! -f ".tweaksinstalled" ]; then echo "[*] Tweaks enabled, running postinstall." echo "[*] Open the Tips app, and click install" echo "[!] Install OpenSSH, curl, and wget from Sileo (add the repo mineek.github.io/repo). Sileo errors are fine. Then, press any key to continue" @@ -651,7 +651,7 @@ rm -rf work rdwork echo "" echo "Done!" echo "The device should now boot to iOS" -if [ $1 = '--tweaks' ]; then +if [ "$1" = '--tweaks' ]; then echo "Tweaks have been started, enjoy!" echo "Please refer to https://github.com/itsnebulalol/ios15-tweaks for supported tweaks" else