eliminated unnecessary cd and failing substitution
Changing the working directory in a sub-subshell
does not change the working directory of the executing
shell.
The substitution was broken for me on _all_ my machines,
so I started looking into the business.
Diff
1diff --git a/tools/upgrade.sh b/tools/upgrade.sh
2index 0aeebdebf5e80262c83b81026f996145a3bb92a3..3624a88e5a5f3101a343cda98810fd01fa9e44af 100644
3--- a/tools/upgrade.sh
4+++ b/tools/upgrade.sh
5@@ -1,8 +1,5 @@
6-current_path=`pwd`
7-current_path=${current_path/ /\\ }
8 printf '\033[0;34m%s\033[0m\n' "Upgrading Oh My Zsh"
9 cd "$ZSH"
10-
11 if git pull origin master
12 then
13 printf '\033[0;32m%s\033[0m\n' ' __ __ '
14@@ -17,4 +14,3 @@ else
15 printf '\033[0;31m%s\033[0m\n' 'There was an error updating. Try again later?'
16 fi
1718-cd "$current_path"