X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=dmenu_path;h=e725ede43beff1c161d2e04ca10336d9939f2283;hb=8b633bf17de71ffec76b2413c23c01bb705c36b8;hp=e590a5c835c5612fde380271b374d86cb80c15fc;hpb=64697cdd0c25ee19413a57d723c1bcaff883f122;p=dmenu.git diff --git a/dmenu_path b/dmenu_path index e590a5c..e725ede 100755 --- a/dmenu_path +++ b/dmenu_path @@ -3,20 +3,22 @@ CACHE=$HOME/.dmenu_cache UPTODATE=1 IFS=: +uptodate() { [ $UPTODATE -eq 1 ]; } + if test ! -f $CACHE then - unset UPTODATE + UPTODATE=0 fi -if test $UPTODATE +if uptodate then for dir in $PATH do - test $dir -nt $CACHE && unset UPTODATE + test $dir -nt $CACHE && { UPTODATE=0; break; } done fi -if test ! $UPTODATE +if ! uptodate then for dir in $PATH do