X-Git-Url: https://git.xinqibao.xyz/dmenu.git/blobdiff_plain/4042a11e5174633e9beeeec120937856e1d0f74f..dfe95cb5468618b2eb3d53d41e2ec9f4d167f3f9:/dmenu_path diff --git a/dmenu_path b/dmenu_path index e590a5c..cd43748 100755 --- a/dmenu_path +++ b/dmenu_path @@ -1,22 +1,17 @@ #!/bin/sh CACHE=$HOME/.dmenu_cache -UPTODATE=1 IFS=: -if test ! -f $CACHE -then - unset UPTODATE -fi - -if test $UPTODATE -then - for dir in $PATH - do - test $dir -nt $CACHE && unset UPTODATE - done -fi +uptodate() { + test ! -f $CACHE && return 1 + for dir in $PATH + do + test $dir -nt $CACHE && return 1 + done + return 0 +} -if test ! $UPTODATE +if ! uptodate then for dir in $PATH do