Skip to content

Commit

Permalink
Add support for OpenBSD's pkg_add (issue #21).
Browse files Browse the repository at this point in the history
  • Loading branch information
postmodern committed May 1, 2024
1 parent d4fe43f commit 3494c6f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ronin-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ function detect_package_manager()
*BSD)
if command -v pkg >/dev/null; then
package_manager="pkg"
elif command -v pkg_add >/dev/null; then
package_manager="pkg_add"
fi
;;
esac
Expand Down Expand Up @@ -179,6 +181,7 @@ function install_packages()
dnf|yum)$sudo $package_manager install -y "$@" || return $? ;;
port) $sudo port install "$@" || return $? ;;
pkg) $sudo pkg install -y "$@" || return $? ;;
pkg_add)$sudo pkg_add "$@" || return $? ;;
brew)
local brew_owner="$(/usr/bin/stat -f %Su "$(command -v brew)")"
sudo -u "$brew_owner" brew install "$@" ||
Expand Down

0 comments on commit 3494c6f

Please sign in to comment.