about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWeirdTreeThing <bradyn127@protonmail.com>2024-03-11 18:17:06 -0400
committerWeirdTreeThing <bradyn127@protonmail.com>2024-03-11 18:17:06 -0400
commit8fd787cf4b3cf959dc4067e278f4cce15f1328b9 (patch)
treedc3d460f3d6fddd0c0128cd89106c5e1184475cf
parent160bbc0e8133e11de6c20eaf508070c6b96d3772 (diff)
Add quotes around variables that might not be set
-rwxr-xr-xinstall.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/install.sh b/install.sh
index eeb9d32..963016f 100755
--- a/install.sh
+++ b/install.sh
@@ -29,7 +29,7 @@ elif [ -f /usr/bin/doas ]; then
 fi
 
 # Fedora with the terra repo (Ultramarine) has keyd packaged
-[ $distro = "fedora" ] && dnf info keyd -y&>> pkg.log && FEDORA_HAS_KEYD=1
+[ "$distro" = "fedora" ] && dnf info keyd -y&>> pkg.log && FEDORA_HAS_KEYD=1
 
 if ! [ -f /usr/bin/keyd ]; then
     # if keyd isnt installed
@@ -55,7 +55,7 @@ if ! [ -f /usr/bin/keyd ]; then
 			$privesc apk add --no-interactive keyd &>> pkg.log
 			;;
 		*)
-			if [ $FEDORA_HAS_KEYD -eq 1 ]; then
+			if [ "$FEDORA_HAS_KEYD" -eq 1 ]; then
 				$privesc dnf install -y keyd &>> pkg.log
 			else
 				git clone https://github.com/rvaiya/keyd &>> pkg.log