aboutsummaryrefslogtreecommitdiff
path: root/dmenu_path
diff options
context:
space:
mode:
Diffstat (limited to 'dmenu_path')
-rwxr-xr-xdmenu_path23
1 files changed, 8 insertions, 15 deletions
diff --git a/dmenu_path b/dmenu_path
index e725ede..cd43748 100755
--- a/dmenu_path
+++ b/dmenu_path
@@ -1,22 +1,15 @@
1#!/bin/sh 1#!/bin/sh
2CACHE=$HOME/.dmenu_cache 2CACHE=$HOME/.dmenu_cache
3UPTODATE=1
4IFS=: 3IFS=:
5 4
6uptodate() { [ $UPTODATE -eq 1 ]; } 5uptodate() {
7 6 test ! -f $CACHE && return 1
8if test ! -f $CACHE 7 for dir in $PATH
9then 8 do
10 UPTODATE=0 9 test $dir -nt $CACHE && return 1
11fi 10 done
12 11 return 0
13if uptodate 12}
14then
15 for dir in $PATH
16 do
17 test $dir -nt $CACHE && { UPTODATE=0; break; }
18 done
19fi
20 13
21if ! uptodate 14if ! uptodate
22then 15then