12345678910111213141516171819202122232425262728293031 |
- #!/bin/sh
- if [ "$1" = "help" ]; then
- echo "*** Description ***"
- echo "Removes a package from the system using the system package manager"
- echo ""
- echo "*** Usage ***"
- echo "pkg-rm <package-name(s)>"
- echo ""
- echo "*** Parameters ***"
- echo "package-name(s): Name of packages to removed"
- echo ""
- echo "*** Options ***"
- echo ""
- exit 0
- fi
- void () {
- if [ -f /usr/bin/xbps-remove ]; then
- echo "Doing dry run"
- xbps-remove -oRyn "$@"
- echo "Finished dry run, continue?"
- doas xbps-remove -oR "$@"
- exit 1
- fi
- }
- void "$@"
- echo "Cannot determain package manager"
|