From 071c1bdb8759e27701e286e0ca87ae0f27fc716f Mon Sep 17 00:00:00 2001 From: Sameer Rahmani Date: Thu, 24 May 2018 16:27:23 +0100 Subject: [PATCH] Minor bug fixed in zshrc sample file --- scripts/install.sh | 11 ++++++++--- zshrc.sample | 1 - 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 216c536..6432a9e 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -59,20 +59,22 @@ main() { exit 1 fi fi + env git clone --depth=1 https://github.com/lxsameer/My.Zsh.git $ZSH || { printf "Error: git clone of My.Zsh repo failed\n" exit 1 } - cd $ZSH && env git submodule init || { + pushd $ZSH + $(env git submodule init && git submodule update) || { printf "Error: git submodule of My.Zsh repo failed\n" exit 1 } + popd printf "${BLUE}Looking for an existing zsh config...${NORMAL}\n" if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]; then - printf "${YELLOW}Found ~/.zshrc.${NORMAL} ${GREEN}Backing up to ~/.zshrc.override ${NORMAL}\n"; - printf "${YELLOW}Your configuration will load by My.Zsh by default. ${NORMAL}\n"; + printf "${YELLOW}Found ~/.zshrc.${NORMAL} ${GREEN}Backing up to ~/.zshrc.backup ${NORMAL}\n"; mv ~/.zshrc ~/.zshrc.override; fi @@ -94,7 +96,10 @@ main() { fi printf "${GREEN}" + echo '' echo 'My.Zsh has been installed.' + echo 'Put your custom configuration on ~/.zshrc.override' + echo '' printf "${NORMAL}" env zsh } diff --git a/zshrc.sample b/zshrc.sample index d237b2b..012d806 100644 --- a/zshrc.sample +++ b/zshrc.sample @@ -3,7 +3,6 @@ THEME=$MYZSH/themes/lxsameer.zsh-theme source $MYZSH/my.zsh PROJECTS=$HOME/src/ -eval $(keychain --eval --agents ssh -Q --quiet id_rsa) # All of your configuration goes this file load_overrides ~/.zshrc.override