diff options
author | Anselm R Garbe <garbeam@gmail.com> | 2008-04-09 23:31:49 +0100 |
---|---|---|
committer | Anselm R Garbe <garbeam@gmail.com> | 2008-04-09 23:31:49 +0100 |
commit | 7195e941c1cb91e347a9c906203ad39245deabd6 (patch) | |
tree | e77ce0820f001ff027c30b77c4acc639c42094bf /dmenu_path | |
parent | 12805b69acac4b2daa09ef7570cf1c3161ba6c9d (diff) |
re-applied Peter Hartlich's and Jukkas dmenu-related patches, for odd reasons they disappeared
Diffstat (limited to 'dmenu_path')
-rwxr-xr-x | dmenu_path | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -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" |