Add support for different OS package managers; simplify some logic

This commit is contained in:
2025-01-25 18:41:52 -06:00
parent bfae90f83a
commit aa64550b72
15 changed files with 42 additions and 42 deletions

9
set_env_vars Normal file
View File

@ -0,0 +1,9 @@
[[ -z $BOX_SETUP_OS ]] && echo "BOX_SETUP_OS must be set" && exit 1
local install_cmd=''
case $BOX_SETUP_OS in
(arch | artix) install_cmd="sudo pacman -S" ;;
(debian) export install_cmd="sudo apt install" ;;
(macos) export install_cmd="brew install" ;;
esac
export BOX_SETUP_INSTALL_COMMAND="$install_cmd"