aboutsummaryrefslogtreecommitdiff
path: root/dmenu_path
diff options
context:
space:
mode:
authorAnselm R Garbe <garbeam@gmail.com>2008-04-09 23:31:49 +0100
committerAnselm R Garbe <garbeam@gmail.com>2008-04-09 23:31:49 +0100
commit7195e941c1cb91e347a9c906203ad39245deabd6 (patch)
treee77ce0820f001ff027c30b77c4acc639c42094bf /dmenu_path
parent12805b69acac4b2daa09ef7570cf1c3161ba6c9d (diff)
re-applied Peter Hartlich's and Jukkas dmenu-related patches, for odd reasons they disappeared
Diffstat (limited to 'dmenu_path')
-rwxr-xr-xdmenu_path16
1 files changed, 8 insertions, 8 deletions
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
3IFS=: 3IFS=:
4 4
5uptodate() { 5uptodate() {
6 test ! -f $CACHE && return 1 6 test -f "$CACHE" &&
7 for dir in $PATH 7 for dir in $PATH
8 do 8 do
9 test $dir -nt $CACHE && return 1 9 test ! $dir -nt "$CACHE" || return 1
10 done 10 done
11 return 0
12} 11}
13 12
14if ! uptodate 13if ! uptodate
15then 14then
16 for dir in $PATH 15 for dir in $PATH
17 do 16 do
18 for file in "$dir"/* 17 cd "$dir" &&
18 for file in *
19 do 19 do
20 test -x "$file" && echo "${file##*/}" 20 test -x "$file" && echo "$file"
21 done 21 done
22 done | sort | uniq > $CACHE.$$ 22 done | sort -u > "$CACHE".$$ &&
23 mv $CACHE.$$ $CACHE 23 mv "$CACHE".$$ "$CACHE"
24fi 24fi
25 25
26cat $CACHE 26cat "$CACHE"