From 7cedae7f4b26ab357283724c662ef05a781cec7b Mon Sep 17 00:00:00 2001 From: Ibrahim Mkusa Date: Thu, 8 Aug 2024 10:15:11 -0400 Subject: [PATCH] detect package manager --- install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 84a9a26..c49c648 100755 --- a/install.sh +++ b/install.sh @@ -12,11 +12,13 @@ if [[ -f /etc/os-release ]]; then case "$ID_LIKE" in debian) 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) 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 else echo "You are running an unrecognized family of os. Quitting..."