using case statements now
This commit is contained in:
parent
fe3f42bd79
commit
7e84acc3b2
1 changed files with 38 additions and 20 deletions
58
init.sh
58
init.sh
|
@ -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
|
||||||
bash udeps.sh
|
u)
|
||||||
elif [[ $answer = "O" ]] || [[ $answer = "o" ]]; then
|
bash udeps.sh
|
||||||
bash odeps.sh
|
;;
|
||||||
else
|
o)
|
||||||
echo "Skipping!"
|
bash odeps.sh
|
||||||
fi
|
;;
|
||||||
|
a)
|
||||||
|
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
|
||||||
echo "Initializing Prezto"
|
z | zsh)
|
||||||
zsh prezto.zsh
|
echo "Initializing Prezto"
|
||||||
chsh -s /usr/bin/zsh
|
zsh prezto.zsh
|
||||||
elif [[ $answer = "fish" ]] || [[ $answer = "f" ]]; then
|
chsh -s /usr/bin/zsh
|
||||||
echo "Installing Oh-My-Fish"
|
;;
|
||||||
bash fish.sh
|
f | fish)
|
||||||
chsh -s /usr/bin/fish
|
echo "Installing Oh-My-Fish"
|
||||||
else
|
bash fish.sh
|
||||||
echo "Guess we're sticking with default bash then..."
|
chsh -s /usr/bin/fish
|
||||||
fi
|
;;
|
||||||
|
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
|
||||||
|
;;
|
||||||
|
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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue