My dmenu build
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

27 lines
340 B

  1. #!/bin/sh
  2. CACHE=$HOME/.dmenu_cache
  3. IFS=:
  4. uptodate() {
  5. test -f "$CACHE" &&
  6. for dir in $PATH
  7. do
  8. test ! $dir -nt "$CACHE" || return 1
  9. done
  10. }
  11. if ! uptodate
  12. then
  13. for dir in $PATH
  14. do
  15. cd "$dir" &&
  16. for file in *
  17. do
  18. test -x "$file" && echo "$file"
  19. done
  20. done | sort -u > "$CACHE".$$ &&
  21. mv "$CACHE".$$ "$CACHE"
  22. fi
  23. cat "$CACHE"