dc45119ecc2d0d244ecc463cc959473a99423cb6

Author
Robby Russell <robby@planetargon.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Merge pull request #833 from backspace/patch-1

Don’t report that Oh My Zsh has been updated when it hasn’t.

Diff

 1diff --git a/tools/upgrade.sh b/tools/upgrade.sh
 2index 6ffe56f4caa1c353c759c2586b8ef25f50ca2487..b2a1c06c430171567c25ed5b8e5aff5b2983d2a6 100644
 3--- a/tools/upgrade.sh
 4+++ b/tools/upgrade.sh
 5@@ -1,12 +1,19 @@
 6 current_path=`pwd`
 7 printf '\033[0;34m%s\033[0m\n' "Upgrading Oh My Zsh"
 8-( cd $ZSH && git pull origin master )
 9-printf '\033[0;32m%s\033[0m\n' '         __                                     __   '
10-printf '\033[0;32m%s\033[0m\n' '  ____  / /_     ____ ___  __  __   ____  _____/ /_  '
11-printf '\033[0;32m%s\033[0m\n' ' / __ \/ __ \   / __ `__ \/ / / /  /_  / / ___/ __ \ '
12-printf '\033[0;32m%s\033[0m\n' '/ /_/ / / / /  / / / / / / /_/ /    / /_(__  ) / / / '
13-printf '\033[0;32m%s\033[0m\n' '\____/_/ /_/  /_/ /_/ /_/\__, /    /___/____/_/ /_/  '
14-printf '\033[0;32m%s\033[0m\n' '                        /____/                       '
15-printf '\033[0;34m%s\033[0m\n' 'Hooray! Oh My Zsh has been updated and/or is at the current version.'
16-printf '\033[0;34m%s\033[1m%s\033[0m\n' 'To keep up on the latest, be sure to follow Oh My Zsh on twitter: ' 'http://twitter.com/ohmyzsh'
17-cd "$current_path"
18+cd $ZSH
19+
20+if git pull origin master
21+then
22+  printf '\033[0;32m%s\033[0m\n' '         __                                     __   '
23+  printf '\033[0;32m%s\033[0m\n' '  ____  / /_     ____ ___  __  __   ____  _____/ /_  '
24+  printf '\033[0;32m%s\033[0m\n' ' / __ \/ __ \   / __ `__ \/ / / /  /_  / / ___/ __ \ '
25+  printf '\033[0;32m%s\033[0m\n' '/ /_/ / / / /  / / / / / / /_/ /    / /_(__  ) / / / '
26+  printf '\033[0;32m%s\033[0m\n' '\____/_/ /_/  /_/ /_/ /_/\__, /    /___/____/_/ /_/  '
27+  printf '\033[0;32m%s\033[0m\n' '                        /____/                       '
28+  printf '\033[0;34m%s\033[0m\n' 'Hooray! Oh My Zsh has been updated and/or is at the current version.'
29+  printf '\033[0;34m%s\033[1m%s\033[0m\n' 'To keep up on the latest, be sure to follow Oh My Zsh on twitter: ' 'http://twitter.com/ohmyzsh'
30+else
31+  printf '\033[0;31m%s\033[0m\n' 'There was an error updating. Try again later?'
32+fi
33+
34+cd "$current_path"