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