From 32a42f27b62b62bd915ab632b0b36fa939d22c0e Mon Sep 17 00:00:00 2001 From: Gaurav Misra Date: Tue, 9 Apr 2013 11:45:16 -0700 Subject: [PATCH] Escape spaces in folder name so script won't fail If the current directory has spaces, the script fails to change paths and fails. --- tools/upgrade.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/upgrade.sh b/tools/upgrade.sh index b2a1c06c..cd689ba1 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"