Browse files

In Darwin, explicitly use system's "basename" command.

basename in MacPorts' coreutils port has only --help
and --version option.  Usually it is installed as gbasename so no
problem will occur, but one can install it +with_default_names variant
which also installs basename as a symbolic link to gbasename.  In that
case rvm will fail in building ruby interpreters.
  • Loading branch information...
1 parent ec137f2 commit eddda0d7482d4a1a7131441c8859c8b57ea34b24 OZAWA Sakuro committed with wayneeseguin Nov 30, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 scripts/utility
View
4 scripts/utility
@@ -66,7 +66,7 @@ __rvm_debug() {
$rvm_scripts_path/log "debug" "ARCHFLAGS: $ARCHFLAGS"
$rvm_scripts_path/log "debug" "LDFLAGS: $LDFLAGS"
$rvm_scripts_path/log "debug" "CFLAGS: $CFLAGS"
- $rvm_scripts_path/log "debug" "/Developer/SDKs/*:$(basename -a /Developer/SDKs/* | tr "\n" ',')"
+ $rvm_scripts_path/log "debug" "/Developer/SDKs/*:$(/usr/bin/basename -a /Developer/SDKs/* | tr "\n" ',')"
fi
for file_name in $(echo $rc_files) ; do
@@ -679,7 +679,7 @@ __rvm_make_flags() {
if [[ ! -z "$rvm_archflags" ]] ; then
ARCHFLAGS="$rvm_archflags" ; export ARCHFLAGS
# Use the latest sdk available.
- if [[ -z "$rvm_sdk" ]] ; then rvm_sdk="$(basename -a /Developer/SDKs/* | awk '/^M/' | sort | tail -n 1)" ; fi
+ if [[ -z "$rvm_sdk" ]] ; then rvm_sdk="$(/usr/bin/basename -a /Developer/SDKs/* | awk '/^M/' | sort | tail -n 1)" ; fi
CFLAGS="${CFLAGS:-"-isysroot /Developer/SDKs/$rvm_sdk $rvm_archflags"}" ; export CFLAGS
LDFLAGS="${LDFLAGS:-"-Wl,-syslibroot /Developer/SDKs/$rvm_sdk $rvm_archflags"}" ; export LDFLAGS
# CXXFLAGS="-mmacosx-version-min="$(sw_vers -productVersion | awk -F'.' '{print $1"."$2}')" -isysroot /Developer/SDKs/$rvm_sdk " ; export CXXFLAGS

0 comments on commit eddda0d

Please sign in to comment.