Minor bug fixed in zshrc sample file

This commit is contained in:
Sameer Rahmani 2018-05-24 16:27:23 +01:00
parent a2d7aad519
commit 071c1bdb87
2 changed files with 8 additions and 4 deletions

View File

@ -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
}

View File

@ -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