Xinqi Bao's Git
projects
/
dmenu.git
/ blob
summary
|
log
|
commit
|
diff
|
tree
history
|
raw
|
HEAD
update draw.c
[dmenu.git]
/
dmenu_path
1
#!/bin/sh
2
CACHE
=
$HOME
/
.dmenu_cache
3
IFS
=:
4
5
if
!
test -f
"
$CACHE
"
||
find
$PATH
-type
d
-newer
"
$CACHE
"
|
grep
-q
.
;
then
6
find
$PATH
!
-type
d \
(
-perm -1 -o -perm -10 -o -perm -100
\
)
|
sed
's/.*\///'
|
sort
-u
>
"
$CACHE
"
7
fi
8
9
cat
"
$CACHE
"