pkg-in 639 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/sh
  2. if [ "$1" = "help" ]; then
  3. echo "*** Description ***"
  4. echo "Installs package to system using system package manager"
  5. echo ""
  6. echo "*** Usage ***"
  7. echo "pkg-in <package-name(s)>"
  8. echo ""
  9. echo "*** Parameters ***"
  10. echo "package-name(s): Name of packages to install"
  11. echo ""
  12. echo "*** Options ***"
  13. echo ""
  14. exit 0
  15. fi
  16. void () {
  17. if [ -f /usr/bin/xbps-install ]; then
  18. echo "Doing dry run"
  19. xbps-install -Syn "$@"
  20. echo "Finished dry run, continue?"
  21. doas xbps-install -S "$@"
  22. exit 1
  23. fi
  24. }
  25. void "$@"
  26. echo "Cannot determain package manager"