From 391fecb04924e5fdc3f6f6b10dd8ad9b6f6a2ba8 Mon Sep 17 00:00:00 2001 From: shinu_donney Date: Tue, 11 May 2021 00:45:21 +0530 Subject: [PATCH] Make empty string check more consistent Replace explicit empty string check condition with inbuilt POSIX compliant empty string check flag, in adherence with the rest of the script. --- .local/bin/dmenumount | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/dmenumount b/.local/bin/dmenumount index b98b6a3a..55af9d04 100755 --- a/.local/bin/dmenumount +++ b/.local/bin/dmenumount @@ -9,7 +9,7 @@ getmount() { \ [ -z "$chosen" ] && exit 1 # shellcheck disable=SC2086 mp="$(find $1 2>/dev/null | dmenu -i -p "Type in mount point.")" || exit 1 - [ "$mp" = "" ] && exit 1 + [ -z "$mp" ] && exit 1 if [ ! -d "$mp" ]; then mkdiryn=$(printf "No\\nYes" | dmenu -i -p "$mp does not exist. Create it?") || exit 1 [ "$mkdiryn" = "Yes" ] && (mkdir -p "$mp" || sudo -A mkdir -p "$mp")