detect package manager

This commit is contained in:
Ibrahim Mkusa 2024-08-08 10:15:11 -04:00
parent e732440189
commit 7cedae7f4b

View File

@ -12,11 +12,13 @@ if [[ -f /etc/os-release ]]; then
case "$ID_LIKE" in case "$ID_LIKE" in
debian) debian)
echo "Running on debian-family. Installing core packages" echo "Running on debian-family. Installing core packages"
sudo apt install -y vim-nox git stow curl ranger tmux package_manager=apt
sudo $package_manager install -y vim-nox git stow curl ranger tmux
;; ;;
fedora) fedora)
echo "Running on debian-family. Installing core packages" echo "Running on debian-family. Installing core packages"
sudo apt install -y vim-enhanced git stow curl ranger tmux package_manager=fedora
sudo $package_manager install -y vim-enhanced git stow curl ranger tmux
esac esac
else else
echo "You are running an unrecognized family of os. Quitting..." echo "You are running an unrecognized family of os. Quitting..."