diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2019-11-21 09:04:33 -0700 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2019-11-21 09:04:33 -0700 |
commit | 9c851a9b820a70b8d23dee0b51220d009e749cec (patch) | |
tree | c753688ce9392dc24043cb2f3072d0fec9faab7c /tools/upgrade.sh | |
parent | 1ffd2849fc056dced0c80a9ed8905f29ff9827a5 (diff) | |
parent | 1c98b9cc38d34647f1d6357919a0f4e1d5ebd4cd (diff) | |
download | zsh-9c851a9b820a70b8d23dee0b51220d009e749cec.tar.gz zsh-9c851a9b820a70b8d23dee0b51220d009e749cec.tar.bz2 zsh-9c851a9b820a70b8d23dee0b51220d009e749cec.zip |
Merge branch 'master' of https://github.com/robbyrussell/oh-my-zsh
Diffstat (limited to 'tools/upgrade.sh')
-rw-r--r-- | tools/upgrade.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/upgrade.sh b/tools/upgrade.sh index 0dd855b70..55768cd6e 100644 --- a/tools/upgrade.sh +++ b/tools/upgrade.sh @@ -31,6 +31,12 @@ git config fsck.zeroPaddedFilemode ignore git config fetch.fsck.zeroPaddedFilemode ignore git config receive.fsck.zeroPaddedFilemode ignore +# Update upstream remote to ohmyzsh org +remote=$(git remote -v | awk '/https:\/\/github\.com\/robbyrussell\/oh-my-zsh\.git/{ print $1; exit }') +if [[ -n "$remote" ]]; then + git remote set-url "$remote" "https://github.com/ohmyzsh/ohmyzsh.git" +fi + printf "${BLUE}%s${NORMAL}\n" "Updating Oh My Zsh" if git pull --rebase --stat origin master then @@ -43,7 +49,7 @@ then printf '%s\n' ' /____/ ' 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" "Get your Oh My Zsh swag at: https://shop.planetargon.com/collections/oh-my-zsh" + printf "${BLUE}${BOLD}%s${NORMAL}\n" "Get your Oh My Zsh swag at: https://shop.planetargon.com/collections/oh-my-zsh" else printf "${RED}%s${NORMAL}\n" 'There was an error updating. Try again later?' fi |