repo.or.cz
/
dmenu_hack.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Initial Test
[dmenu_hack.git]
/
dmenu_path
blob
7896a9e957fa1e274805c0641c841a6b82334667
1
#!/bin/sh
2
CACHE
=
$HOME
/
.dmenu_cache
3
IFS
=:
4
5
uptodate
() {
6
test -f
"
$CACHE
"
&&
7
for
dir
in
$PATH
8
do
9
test
!
$dir
-nt
"
$CACHE
"
||
return
1
10
done
11
}
12
13
if
!
uptodate
14
then
15
for
dir
in
$PATH
16
do
17
cd
"
$dir
"
&&
18
for
file
in
*
19
do
20
test -x
"
$file
"
&&
echo
"
$file
"
21
done
22
done
|
sort
|
uniq
>
"
$CACHE
"
.$$
&&
23
mv
"
$CACHE
"
.$$
"
$CACHE
"
24
fi
25
26
cat
"
$CACHE
"