summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorGaurav Misra <keyvez@gmail.com>2013-04-09 11:45:16 -0700
committerGaurav Misra <keyvez@gmail.com>2013-04-09 11:45:16 -0700
commit32a42f27b62b62bd915ab632b0b36fa939d22c0e (patch)
tree72d4006b32c4ffbf0f124f814fdd7fd26b4f0df0 /tools
parent0198a12953ab92f5cc07ae464c34e3e37ab34d33 (diff)
downloadzsh-32a42f27b62b62bd915ab632b0b36fa939d22c0e.tar.gz
zsh-32a42f27b62b62bd915ab632b0b36fa939d22c0e.tar.bz2
zsh-32a42f27b62b62bd915ab632b0b36fa939d22c0e.zip
Escape spaces in folder name so script won't fail
If the current directory has spaces, the script fails to change paths and fails.
Diffstat (limited to 'tools')
-rw-r--r--tools/upgrade.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/upgrade.sh b/tools/upgrade.sh
index b2a1c06c4..cd689ba1f 100644
--- a/tools/upgrade.sh
+++ b/tools/upgrade.sh
@@ -1,4 +1,5 @@
current_path=`pwd`
+current_path=${current_path/ /\\ }
printf '\033[0;34m%s\033[0m\n' "Upgrading Oh My Zsh"
cd $ZSH
@@ -16,4 +17,4 @@ else
printf '\033[0;31m%s\033[0m\n' 'There was an error updating. Try again later?'
fi
-cd "$current_path" \ No newline at end of file
+cd "$current_path"