logo

utils

~/.local/bin tools and git-hooks git clone https://hacktivis.me/git/utils.git
commit: 8eb74955a5d1bdd3923e476c288d81a06208c3e6
parent 2a292faf7ff5e9a364533f21b4f58a3b86b099ab
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Thu, 10 Feb 2022 01:14:52 +0100

bin/dmenu_path: fix problems found by shellcheck

Diffstat:

Mbin/dmenu_path4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/dmenu_path b/bin/dmenu_path @@ -11,8 +11,8 @@ fi test -f "${cache}" || touch -d 1970-01-01T00:00:00 "${cache}" IFS=: -if [ "$(find $PATH -type d -newer "$cache" 2>/dev/null | wc -l)" != "0" ]; then - find $PATH -type f -perm -o=rx 2>/dev/null | while read file; do basename "$file"; done | sort -u | tee "$cache" +if [ "$(find "$PATH" -type d -newer "$cache" 2>/dev/null | wc -l)" != "0" ]; then + find "$PATH" -type f -perm -o=rx 2>/dev/null | while read -r file; do basename "$file"; done | sort -u | tee "$cache" else cat "$cache" fi