From 1e957b7f901c2bb98f7265d2862d8bc9acdc2f79 Mon Sep 17 00:00:00 2001 From: 7ze Date: Mon, 31 May 2021 06:32:36 +0530 Subject: [PATCH] Update: dmenumount -Make empty string check more consistent (#955) * 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. * Update test expression --- .local/bin/dmenumount | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/dmenumount b/.local/bin/dmenumount index b98b6a3..3cb1f81 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 + test -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")