ArchSetupScripts/non_pac.sh

29 lines
806 B
Bash
Raw Normal View History

2024-11-10 13:58:16 +00:00
#!/bin/bash
main(){
run_non_pac_install;
}
_install_non_pacman(){
local name=$1; local cmd=$2; local post=$3;
if ! command -v "$name" &> /dev/null
then
echo "$name Not installed.. installing";
eval "$cmd"
if [[ "$post" ]]; then
eval "$post"
fi
else
echo "$name already installed";
fi
}
run_non_pac_install(){
echo "########################### Non Pacman #######################"
_install_non_pacman "bun" "curl -fsSL https://bun.sh/install | bash;" # no third arg here
_install_non_pacman "starship" "curl -sS https://starship.rs/install.sh | sh" "echo \"eval \$(starship init bash)\" >> ~/.bashrc"
_install_non_pacman "vim-plug" "curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim"
}
main;