From 7195e941c1cb91e347a9c906203ad39245deabd6 Mon Sep 17 00:00:00 2001 From: Anselm R Garbe Date: Wed, 9 Apr 2008 23:31:49 +0100 Subject: re-applied Peter Hartlich's and Jukkas dmenu-related patches, for odd reasons they disappeared --- dmenu_path | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'dmenu_path') diff --git a/dmenu_path b/dmenu_path index d0a32c5..a9ddd47 100755 --- a/dmenu_path +++ b/dmenu_path @@ -3,24 +3,24 @@ CACHE=$HOME/.dmenu_cache IFS=: uptodate() { - test ! -f $CACHE && return 1 + test -f "$CACHE" && for dir in $PATH do - test $dir -nt $CACHE && return 1 + test ! $dir -nt "$CACHE" || return 1 done - return 0 } if ! uptodate then for dir in $PATH do - for file in "$dir"/* + cd "$dir" && + for file in * do - test -x "$file" && echo "${file##*/}" + test -x "$file" && echo "$file" done - done | sort | uniq > $CACHE.$$ - mv $CACHE.$$ $CACHE + done | sort -u > "$CACHE".$$ && + mv "$CACHE".$$ "$CACHE" fi -cat $CACHE +cat "$CACHE" -- cgit v1.2.3-70-g09d2