Add script to update package manager defs and packages
This commit is contained in:
@ -3,10 +3,26 @@
|
||||
exit 1
|
||||
|
||||
local install_cmd=''
|
||||
local update_pkg_manager_and_defs_cmd=''
|
||||
local update_pkgs_cmd=''
|
||||
case $BOX_SETUP_OS in
|
||||
(arch | artix) install_cmd="sudo pacman -S" ;;
|
||||
(debian) install_cmd="sudo apt install" ;;
|
||||
(macos) install_cmd="brew install" ;;
|
||||
(arch | artix)
|
||||
install_cmd="sudo pacman -S"
|
||||
update_pkg_manager_and_defs_cmd='' # don't; update system instead?
|
||||
update_pkgs_cmd='sudo pacman -Syu'
|
||||
;;
|
||||
(debian)
|
||||
install_cmd="sudo aptitude install"
|
||||
update_pkg_manager_and_defs_cmd='sudo aptitude update'
|
||||
update_pkgs_cmd='sudo aptitude full-upgrade'
|
||||
;;
|
||||
(macos)
|
||||
install_cmd="brew install"
|
||||
update_pkg_manager_and_defs_cmd='brew update'
|
||||
update_pkgs_cmd='brew upgrade'
|
||||
;;
|
||||
esac
|
||||
|
||||
export BOX_SETUP_INSTALL_COMMAND="$install_cmd"
|
||||
export BOX_SETUP_UPDATE_PKG_MANAGER_AND_DEFS_CMD="$update_pkg_manager_and_defs_cmd"
|
||||
export BOX_SETUP_UPDATE_PKGS_CMD="$update_pkgs_cmd"
|
||||
|
Reference in New Issue
Block a user