Permalink
Browse files

fix 'scripts/versionswitcher.sh' to work on zsh

  • Loading branch information...
1 parent 0cc2355 commit 7fb9b8e7e3449ccd7da0c502d2e9e6c73220b805 @kwatch committed Feb 18, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 scripts/versionswitcher.sh
@@ -286,7 +286,7 @@ __vs_download() {
mkdir -p $vs_home/$dir || __vs_error "Failed: mkdir -p $vs_home/$dir" || return 1
fi
local down=`__vs_downloader -sORL -qN` || return 1
- (cd $vs_home/$dir; $down $url) || __vs_error "Failed: $down $url" || return 1
+ (cd $vs_home/$dir; eval $down $url) || __vs_error "Failed: $down $url" || return 1
echo $vs_home/$filename
}
@@ -438,15 +438,15 @@ __vs_upgrade() {
[ -n "$VS_DEBUG" ] && site="http://localhost:8080"
[ -n "$VS_URL" ] && site="$VS_URL"
local down=`__vs_downloader "-sL" "-q -O -"` || return 1
- local ver=`$down $site/version`
+ local ver=`eval $down $site/version`
if [ "$ver" = "$__vs_version" -a -z "$VS_DEBUG" ]; then
__vs_echo "current version is newest. exist."
else
__vs_echo "upgrade to $ver (current: $__vs_version)"
local dir=$HOME/.vs/scripts
mkdir -p $dir
down=`__vs_downloader "-ORL" ""` || return 1
- (cd $dir; rm -f install.sh; $down $site/install.sh)
+ (cd $dir; rm -f install.sh; eval $down $site/install.sh)
if [ -n "$BASH_VERSION" ]; then # for bash
bash $dir/install.sh
elif [ -n "$ZSH_VERSION" ]; then # for zsh

0 comments on commit 7fb9b8e

Please sign in to comment.