From d3cdc07e262490dbbfbe82386cc718de79886eba Mon Sep 17 00:00:00 2001 From: Hekuran Date: Sun, 4 Apr 2021 10:30:54 +0200 Subject: [PATCH] quoting for quiet shellcheck --- .local/bin/ifinstalled | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.local/bin/ifinstalled b/.local/bin/ifinstalled index 30abe727..7a53b18c 100755 --- a/.local/bin/ifinstalled +++ b/.local/bin/ifinstalled @@ -7,7 +7,7 @@ for x in "$@";do notify() { notify-send "📦 $x" "must be installed for this function." && exit 1 ;} - which_out="$( /usr/bin/which $x >/dev/null 2>&1 )" && exit 0 #you might have compiled the prog, and not install the repo pkg... - pkgname="$(pacman -Qqo $which_out >/dev/null 2>&1 )" #...thats why two variables. + which_out="$( /usr/bin/which "$x" >/dev/null 2>&1 )" && exit 0 #you might have compiled the prog, and not install the repo pkg... + pkgname="$(pacman -Qqo "$which_out" >/dev/null 2>&1 )" #...thats why two variables. pacman -Qq "$pkgname" >/dev/null 2>&1 || notify done