using case statements now

This commit is contained in:
Stefen Auris 2021-07-27 04:58:23 -04:00
parent fe3f42bd79
commit 7e84acc3b2

40
init.sh
View file

@ -1,33 +1,51 @@
#!/bin/bash #!/bin/bash
#install pre-req. #install pre-req.
echo -n "Which Linux flavor will we be installing programs for? (u/o)"; read -r answer echo -n "Which Linux flavor will we be installing programs for? (u/o)"; read -r answer
if [[ $answer = "U" ]] || [[ $answer = "u" ]]; then case $answer in
u)
bash udeps.sh bash udeps.sh
elif [[ $answer = "O" ]] || [[ $answer = "o" ]]; then ;;
o)
bash odeps.sh bash odeps.sh
else ;;
echo "Skipping!" a)
fi bash adeps.sh
;;
*)
echo "Skipping installation of dependencies!"
;;
esac
#setup shell #setup shell
bash bash.sh stow bash
echo "Select which shell to configure and use: zsh/fish/bash"; read -r answer echo "Select which shell to configure and use: zsh/fish/bash"; read -r answer
if [[ $answer = "zsh" ]] || [[ $answer = "z" ]]; then case $answer in
z | zsh)
echo "Initializing Prezto" echo "Initializing Prezto"
zsh prezto.zsh zsh prezto.zsh
chsh -s /usr/bin/zsh chsh -s /usr/bin/zsh
elif [[ $answer = "fish" ]] || [[ $answer = "f" ]]; then ;;
f | fish)
echo "Installing Oh-My-Fish" echo "Installing Oh-My-Fish"
bash fish.sh bash fish.sh
chsh -s /usr/bin/fish chsh -s /usr/bin/fish
else ;;
echo "Guess we're sticking with default bash then..." b | bash)
echo "Installing Bash-It"
git clone --depth=1 https://github.com/Bash-it/bash-it.git ~/.bash_it
;;
*)
echo "Guess we're sticking with vanilla bash then..."
#inject source line into bashrc
if ! grep -q ".sensible.bash" "$HOME/.bashrc"; then
echo "source \"\$HOME/.sensible.bash\"" >> "$HOME/.bashrc"
fi fi
;;
esac
#create symlinks using stow #create symlinks using stow
mkdir ~/.ssh mkdir ~/.ssh
echo "Stowing Configs" echo "Stowing Configs"
stow bash
stow tmux stow tmux
#init TMP #init TMP
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm