From de2d07bd2ebacd231828c918a98d33591f15351a Mon Sep 17 00:00:00 2001 From: Bob Maerten Date: Wed, 17 Apr 2013 17:41:34 +0200 Subject: [PATCH 1/3] Fix regression from 32a42f2 Substitions does not work with /bin/sh so we have to call /bin/bash --- lib/functions.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/functions.zsh b/lib/functions.zsh index 63ab755cf..ff538c88d 100644 --- a/lib/functions.zsh +++ b/lib/functions.zsh @@ -7,7 +7,7 @@ function uninstall_oh_my_zsh() { } function upgrade_oh_my_zsh() { - /usr/bin/env ZSH=$ZSH /bin/sh $ZSH/tools/upgrade.sh + /usr/bin/env ZSH=$ZSH /bin/bash $ZSH/tools/upgrade.sh } function take() { From 34792a68e4e8d430e1fbf5ee6458c212c5b6ef5c Mon Sep 17 00:00:00 2001 From: Bob Maerten Date: Wed, 17 Apr 2013 17:43:40 +0200 Subject: [PATCH 2/3] Rebase instead of pull when upgrading In order to keep local changes and/or prevent conflicts --- tools/upgrade.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/upgrade.sh b/tools/upgrade.sh index 0aeebdebf..896900ef8 100644 --- a/tools/upgrade.sh +++ b/tools/upgrade.sh @@ -3,8 +3,9 @@ current_path=${current_path/ /\\ } printf '\033[0;34m%s\033[0m\n' "Upgrading Oh My Zsh" cd "$ZSH" -if git pull origin master +if git fetch origin then + git rebase origin/master printf '\033[0;32m%s\033[0m\n' ' __ __ ' printf '\033[0;32m%s\033[0m\n' ' ____ / /_ ____ ___ __ __ ____ _____/ /_ ' printf '\033[0;32m%s\033[0m\n' ' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ ' From fd1e0660b37abcad45104712df73909ff09841e8 Mon Sep 17 00:00:00 2001 From: Bob Maerten Date: Fri, 19 Apr 2013 09:58:31 +0200 Subject: [PATCH 3/3] Fix 'Bad substitution' error when upgrading --- tools/check_for_upgrade.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index 581f03a07..1759cd366 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -9,7 +9,7 @@ function _update_zsh_update() { } function _upgrade_zsh() { - /usr/bin/env ZSH=$ZSH /bin/sh $ZSH/tools/upgrade.sh + /usr/bin/env ZSH=$ZSH /bin/bash $ZSH/tools/upgrade.sh # update the zsh file _update_zsh_update }