pkg-search 585 B

12345678910111213141516171819202122232425262728
  1. #!/bin/sh
  2. if [ "$1" = "help" ]; then
  3. echo "*** Description ***"
  4. echo "Search for a package in distro repos, runs fuzzypkg if all else fails"
  5. echo ""
  6. echo "*** Usage ***"
  7. echo "pkg-search <package-name>"
  8. echo ""
  9. echo "*** Parameters ***"
  10. echo "package-name: Name of package to search for"
  11. echo ""
  12. echo "*** Options ***"
  13. echo ""
  14. exit 0
  15. fi
  16. void () {
  17. if [ -f /usr/bin/xbps-install ]; then
  18. xbps-query -Rs "$@"
  19. exit 1
  20. fi
  21. }
  22. void "$@"
  23. [ -f /usr/bin/fuzzypkg ] && fuzzypkg "$@"
  24. echo "Cannot determain package manager"