Minor bug fixed in zshrc sample file
This commit is contained in:
parent
a2d7aad519
commit
071c1bdb87
|
@ -59,20 +59,22 @@ main() {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
env git clone --depth=1 https://github.com/lxsameer/My.Zsh.git $ZSH || {
|
env git clone --depth=1 https://github.com/lxsameer/My.Zsh.git $ZSH || {
|
||||||
printf "Error: git clone of My.Zsh repo failed\n"
|
printf "Error: git clone of My.Zsh repo failed\n"
|
||||||
exit 1
|
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"
|
printf "Error: git submodule of My.Zsh repo failed\n"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
popd
|
||||||
|
|
||||||
printf "${BLUE}Looking for an existing zsh config...${NORMAL}\n"
|
printf "${BLUE}Looking for an existing zsh config...${NORMAL}\n"
|
||||||
if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]; then
|
if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]; then
|
||||||
printf "${YELLOW}Found ~/.zshrc.${NORMAL} ${GREEN}Backing up to ~/.zshrc.override ${NORMAL}\n";
|
printf "${YELLOW}Found ~/.zshrc.${NORMAL} ${GREEN}Backing up to ~/.zshrc.backup ${NORMAL}\n";
|
||||||
printf "${YELLOW}Your configuration will load by My.Zsh by default. ${NORMAL}\n";
|
|
||||||
mv ~/.zshrc ~/.zshrc.override;
|
mv ~/.zshrc ~/.zshrc.override;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -94,7 +96,10 @@ main() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "${GREEN}"
|
printf "${GREEN}"
|
||||||
|
echo ''
|
||||||
echo 'My.Zsh has been installed.'
|
echo 'My.Zsh has been installed.'
|
||||||
|
echo 'Put your custom configuration on ~/.zshrc.override'
|
||||||
|
echo ''
|
||||||
printf "${NORMAL}"
|
printf "${NORMAL}"
|
||||||
env zsh
|
env zsh
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,6 @@ THEME=$MYZSH/themes/lxsameer.zsh-theme
|
||||||
source $MYZSH/my.zsh
|
source $MYZSH/my.zsh
|
||||||
|
|
||||||
PROJECTS=$HOME/src/
|
PROJECTS=$HOME/src/
|
||||||
eval $(keychain --eval --agents ssh -Q --quiet id_rsa)
|
|
||||||
|
|
||||||
# All of your configuration goes this file
|
# All of your configuration goes this file
|
||||||
load_overrides ~/.zshrc.override
|
load_overrides ~/.zshrc.override
|
||||||
|
|
Loading…
Reference in New Issue