diff --git a/init.sh b/init.sh index 554972d..966c634 100755 --- a/init.sh +++ b/init.sh @@ -1,7 +1,14 @@ #!/bin/bash #install pre-req. -echo "installing required packages" -bash deps.sh +echo -n "Which Linux flavor will we be installing programs for? (u/o)"; read answer +if [[ $answer = "U" ]] || [[ $answer = "u" ]]; then + bash udeps.sh +elif [[ $answer = "O" ]] || [[ $answer = "o" ]]; then + bash odeps.sh +else + echo "Aborting!" + exit 1 +fi #setup prezto echo "Initializing Prezto" diff --git a/odeps.sh b/odeps.sh new file mode 100644 index 0000000..c582ccb --- /dev/null +++ b/odeps.sh @@ -0,0 +1,26 @@ +#!/bin/bash +#These are the programs I expect to find on any install + +echo "installing base dependencies" +sudo zypper install git \ + stow \ + etckeeper \ + tmux \ + zsh \ + vim \ + powerline\ + htop \ + mc \ + curl \ + +read -n1 -p $'Does this system need ssh access?\n' REPLY + if [[ $REPLY == [Yy] ]]; then + sudo zypper install openssh-server + fi +read -n1 -p $'\nDoes this system have a GUI?\n' REPLY + if [[ $REPLY == [Yy] ]]; then + sudo zypper install emacs + else + sudo zypper install emacs-nox + fi + diff --git a/deps.sh b/udeps.sh similarity index 100% rename from deps.sh rename to udeps.sh