From 37750eb8a36cbe21dd73b1f1117209188a431654 Mon Sep 17 00:00:00 2001 From: david Date: Tue, 3 Oct 2017 22:16:09 +0200 Subject: [PATCH] autopush by david@ghost --- install.sh | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/install.sh b/install.sh index 9c43706..c5c4281 100755 --- a/install.sh +++ b/install.sh @@ -25,7 +25,7 @@ installdeps() if [ $i -ne 0 ]; then #checking for system - readonly systems="ubuntu arch" + readonly systems="ubuntu arch raspbian solus" issue="$(cat /etc/issue)" for item in $systems; do echo $issue | grep -i $item @@ -41,8 +41,16 @@ installdeps() arch) sudo pacman -Su $missingdeps ;; + raspbian) + sudo apt-get update && sudo apt-get install -y $missingdeps + ;; + solus) + sudo eopkg update-repo && sudo eopkg install $missingdeps + ;; + ?) - echo "unknown system. could not install anything" + echo "[myzsh]: i cannot install dependencies. unknown system." + exit 1 ;; esac @@ -58,7 +66,7 @@ installmyzsh() choice="null" while [ $choice != "y" ] && [ $choice != "n" ]; do echo "" - read -p "should i clone myzsh writeable? [y/n]" choice + read -p "[myzsh]: should i clone myzsh writeable? [y/n]" choice if [ $choice = "y" ]; then git clone git@socialg.it:david/myzsh.git ~/.myzsh else @@ -70,13 +78,11 @@ installmyzsh() echo 'plugins=(david)' >> ~/.zshrc echo 'source $ZSH/myzsh.sh' >> ~/.zshrc echo "export PATH=$PATH" >> ~/.zshrc -# read -p "now modify your ~/.zshrc to your needs" -# vim ~/.zshrc cat /etc/passwd | grep ~ | grep "/bin/zsh" #set default shell if not set already if [ $? -eq 1 ]; then - read -p "time to change your default shell to /bin/zsh" + read -p "[myzsh]: time to change your default shell to /bin/zsh" sudo vim /etc/passwd fi @@ -88,22 +94,22 @@ installmyzsh() if [ -d ~/.myzsh ]; then echo "" - echo "skipping myzsh installation. it is already there." + echo "[myzsh]: it seems i have already been setup." echo "" - read -p "do you want to cleanup and reinstall? [y/n]" choice + read -p "[myzsh]: should i cleanup and reinstall? [y/n]" choice if [ $choice = "y" ]; then installdeps - removeohmyzsh + #removeohmyzsh installmyzsh else - echo "updating instead..." + echo "[myzsh]: updating instead." cd ~/.myzsh git pull origin master cd - fi else installdeps - removeohmyzsh + #removeohmyzsh installmyzsh fi