[hackers] [dmenu] Fix the uptodate logic (uptodate if !find newer dirs than the cache).

From: Kris Maglione <jg_AT_suckless.org>
Date: Thu May 24 01:39:26 2007

changeset: 208:1fed9410fbc6
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Wed May 23 19:38:23 2007 -0400
summary: Fix the uptodate logic (uptodate if !find newer dirs than the cache).

diff -r 27c809f300dd -r 1fed9410fbc6 dmenu_path
--- a/dmenu_path Wed May 23 18:35:05 2007 -0400
+++ b/dmenu_path Wed May 23 19:38:23 2007 -0400
@@ -9,7 +9,7 @@ uptodate() {
 uptodate() {
         test -f $CACHE &&
                 test "$(echo "$PATH")" = "$(sed 1q "$CACHE")" &&
- qfind $PATH -maxdepth 0 -newer $CACHE >/dev/null
+ ! qfind $PATH -maxdepth 0 -newer $CACHE >/dev/null
 }
 
 if ! uptodate
@@ -18,7 +18,7 @@ then
                 echo "$PATH"
                 qfind $PATH -type f -maxdepth 1 '(' -perm -u+x -o -perm -g+x -o -perm -o+x ')' |
                         sed 's,.*/,,' | sort | uniq
- } > $CACHE.$pid
+ }
         mv $CACHE.$pid $CACHE
 fi
 
Received on Thu May 24 2007 - 01:39:26 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:56:48 UTC