Unverified Commit cad48e38 authored by Marc Cornellà's avatar Marc Cornellà Committed by GitHub
Browse files

Merge branch 'master' into fabric_task_description

parents 225425fe 40df67bc
...@@ -10,25 +10,35 @@ if [ -d ~/.oh-my-zsh ]; then ...@@ -10,25 +10,35 @@ if [ -d ~/.oh-my-zsh ]; then
fi fi
echo "Looking for original zsh config..." echo "Looking for original zsh config..."
if [ -f ~/.zshrc.pre-oh-my-zsh ] || [ -h ~/.zshrc.pre-oh-my-zsh ]; then ZSHRC_ORIG=~/.zshrc.pre-oh-my-zsh
echo "Found ~/.zshrc.pre-oh-my-zsh -- Restoring to ~/.zshrc"; if [ -e "$ZSHRC_ORIG" ]; then
echo "Found $ZSHRC_ORIG -- Restoring to ~/.zshrc"
if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]; then if [ -e ~/.zshrc ]; then
ZSHRC_SAVE=".zshrc.omz-uninstalled-$(date +%Y%m%d%H%M%S)"; ZSHRC_SAVE=~/.zshrc.omz-uninstalled-$(date +%Y-%m-%d_%H-%M-%S)
echo "Found ~/.zshrc -- Renaming to ~/${ZSHRC_SAVE}"; echo "Found ~/.zshrc -- Renaming to ${ZSHRC_SAVE}"
mv ~/.zshrc ~/"${ZSHRC_SAVE}"; mv ~/.zshrc "${ZSHRC_SAVE}"
fi fi
mv ~/.zshrc.pre-oh-my-zsh ~/.zshrc; mv "$ZSHRC_ORIG" ~/.zshrc
echo "Your original zsh config was restored. Please restart your session." echo "Your original zsh config was restored."
else fi
if hash chsh >/dev/null 2>&1; then
echo "Switching back to bash" if hash chsh >/dev/null 2>&1; then
chsh -s /bin/bash if [ -f ~/.shell.pre-oh-my-zsh ]; then
old_shell=$(cat ~/.shell.pre-oh-my-zsh)
else
old_shell=/bin/bash
fi
echo "Switching your shell back to '$old_shell':"
if chsh -s "$old_shell"; then
rm -f ~/.shell.pre-oh-my-zsh
else else
echo "You can edit /etc/passwd to switch your default shell back to bash" echo "Could not change default shell. Change it manually by running chsh"
echo "or editing the /etc/passwd file."
fi fi
fi fi
echo "Thanks for trying out Oh My Zsh. It's been uninstalled." echo "Thanks for trying out Oh My Zsh. It's been uninstalled."
echo "Don't forget to restart your terminal!"
...@@ -20,8 +20,18 @@ else ...@@ -20,8 +20,18 @@ else
NORMAL="" NORMAL=""
fi fi
printf "${BLUE}%s${NORMAL}\n" "Updating Oh My Zsh"
cd "$ZSH" cd "$ZSH"
# Set git-config values known to fix git errors
# Line endings (#4069)
git config core.eol lf
git config core.autocrlf false
# zeroPaddedFilemode fsck errors (#4963)
git config fsck.zeroPaddedFilemode ignore
git config fetch.fsck.zeroPaddedFilemode ignore
git config receive.fsck.zeroPaddedFilemode ignore
printf "${BLUE}%s${NORMAL}\n" "Updating Oh My Zsh"
if git pull --rebase --stat origin master if git pull --rebase --stat origin master
then then
printf '%s' "$GREEN" printf '%s' "$GREEN"
...@@ -33,7 +43,7 @@ then ...@@ -33,7 +43,7 @@ then
printf '%s\n' ' /____/ ' printf '%s\n' ' /____/ '
printf "${BLUE}%s\n" "Hooray! Oh My Zsh has been updated and/or is at the current version." printf "${BLUE}%s\n" "Hooray! Oh My Zsh has been updated and/or is at the current version."
printf "${BLUE}${BOLD}%s${NORMAL}\n" "To keep up on the latest news and updates, follow us on twitter: https://twitter.com/ohmyzsh" printf "${BLUE}${BOLD}%s${NORMAL}\n" "To keep up on the latest news and updates, follow us on twitter: https://twitter.com/ohmyzsh"
printf "${BLUE}${BOLD}%s${NORMAL}\n" "Get your Oh My Zsh swag at: http://shop.planetargon.com/" printf "${BLUE}${BOLD}%s${NORMAL}\n" "Get your Oh My Zsh swag at: https://shop.planetargon.com/collections/oh-my-zsh"
else else
printf "${RED}%s${NORMAL}\n" 'There was an error updating. Try again later?' printf "${RED}%s${NORMAL}\n" 'There was an error updating. Try again later?'
fi fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment