2024-07-29 11:32:52 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# Author : Ibrahim Mkusa
|
|
|
|
# Description: installs and sets up core environment for my dev work on servers
|
|
|
|
|
|
|
|
set -e # subshells inherit environment from parent
|
|
|
|
|
|
|
|
# detect which family of distro i'm on
|
|
|
|
if [[ -f /etc/os-release ]]; then
|
|
|
|
. /etc/os-release
|
|
|
|
|
|
|
|
case "$ID_LIKE" in
|
|
|
|
debian)
|
2024-08-09 01:38:48 +00:00
|
|
|
echo "Running on debian-family.."
|
2024-08-08 14:15:11 +00:00
|
|
|
package_manager=apt
|
2024-08-09 01:38:48 +00:00
|
|
|
vim="vim-nox"
|
2024-07-29 11:32:52 +00:00
|
|
|
;;
|
|
|
|
fedora)
|
2024-08-09 01:38:48 +00:00
|
|
|
echo "Running on debian-family.."
|
2024-08-08 14:15:11 +00:00
|
|
|
package_manager=fedora
|
2024-08-09 01:38:48 +00:00
|
|
|
vim="vim-enhanced"
|
2024-07-29 11:32:52 +00:00
|
|
|
esac
|
|
|
|
else
|
|
|
|
echo "You are running an unrecognized family of os. Quitting..."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2024-08-09 01:38:48 +00:00
|
|
|
echo "Installing packages"
|
|
|
|
sudo $package_manager install -y $vim git stow curl ranger tmux
|
2024-07-29 11:32:52 +00:00
|
|
|
# use gnu stow to symlink config files to home directory
|
|
|
|
stow bash git ranger shellenv tmux vim
|