Skip to content

Commit

Permalink
Generate wrapper by default, fix shift for wrapper arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
Sutto committed Jun 2, 2010
1 parent b7980e3 commit b931709
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions scripts/wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@ wrap() {
}

symlink_binary() {
if [[ -f "$file_name" ]]; then
ln -fs "$file_name" "${rvm_bin_path}/${prefix}_${binary_name}"
else
$rvm_scripts_path/log "error" "Please run 'rvm wrapper $environment_identifier $binary_name' first."
fi
# Generate the default wrapper with the given binary name.
[[ ! -f "$file_name" ]] && wrap_binary
# Then symlink it into place.
ln -fs "$file_name" "${rvm_bin_path}/${prefix}_${binary_name}"
}

wrap_binary() {
Expand All @@ -56,7 +55,7 @@ fi
ruby_string="$1"; shift

prefix="$1"
if [[ -z "$1" ]]; then shift; fi
if [[ -n "$1" ]]; then shift; fi

binaries="$(echo "$@" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')"

Expand Down

0 comments on commit b931709

Please sign in to comment.