|
|
|
@ -25,9 +25,8 @@ main() {
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
if ! command -v zsh >/dev/null 2>&1; then
|
|
|
|
|
printf "${YELLOW}Zsh is not installed!${NORMAL} Installing zsh\n"
|
|
|
|
|
sudo apt-get install zsh -y
|
|
|
|
|
|
|
|
|
|
printf "${YELLOW}Zsh is not installed!${NORMAL} Please install zsh first!\n"
|
|
|
|
|
exit
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ ! -n "$ZSH" ]; then
|
|
|
|
@ -40,9 +39,6 @@ main() {
|
|
|
|
|
exit
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
printf "${BLUE}Cloning Oh My Zsh...${NORMAL}\n"
|
|
|
|
|
sudo apt-get install -y fonts-powerline
|
|
|
|
|
|
|
|
|
|
# Prevent the cloned repository from having insecure permissions. Failing to do
|
|
|
|
|
# so causes compinit() calls to fail with "command not found: compdef" errors
|
|
|
|
|
# for users with insecure umasks (e.g., "002", allowing group writability). Note
|
|
|
|
@ -63,7 +59,7 @@ main() {
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
env git clone --depth=1 http://git.adphi.net/Adphi/oh-my-zsh.git $ZSH || {
|
|
|
|
|
env git clone --depth=1 http://git.adphi.net/Adphi/oh-my-zsh.git "$ZSH" || {
|
|
|
|
|
printf "Error: git clone of oh-my-zsh repo failed\n"
|
|
|
|
|
exit 1
|
|
|
|
|
}
|
|
|
|
@ -76,9 +72,9 @@ main() {
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
printf "${BLUE}Using the Oh My Zsh template file and adding it to ~/.zshrc${NORMAL}\n"
|
|
|
|
|
cp $ZSH/templates/zshrc.zsh-template ~/.zshrc
|
|
|
|
|
cp "$ZSH"/templates/zshrc.zsh-template ~/.zshrc
|
|
|
|
|
sed "/^export ZSH=/ c\\
|
|
|
|
|
export ZSH=$ZSH
|
|
|
|
|
export ZSH=\"$ZSH\"
|
|
|
|
|
" ~/.zshrc > ~/.zshrc-omztemp
|
|
|
|
|
mv -f ~/.zshrc-omztemp ~/.zshrc
|
|
|
|
|
|
|
|
|
@ -112,7 +108,7 @@ main() {
|
|
|
|
|
echo 'p.p.s. Get stickers and t-shirts at https://shop.planetargon.com.'
|
|
|
|
|
echo ''
|
|
|
|
|
printf "${NORMAL}"
|
|
|
|
|
env zsh
|
|
|
|
|
env zsh -l
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
main
|
|
|
|
|
main
|