scripts/utility in rvm-0.0.71 vs scripts/utility in rvm-0.0.72
- old
+ new
@@ -42,11 +42,11 @@
__rvm_log "debug" "uname -m: $(uname -m)"
__rvm_log "debug" "sw_vers: $(sw_vers | tr "\n" ',')"
__rvm_log "debug" "ARCHFLAGS: $ARCHFLAGS"
__rvm_log "debug" "LDFLAGS: $LDFLAGS"
__rvm_log "debug" "CFLAGS: $CFLAGS"
- __rvm_log "debug" "/Developer/SDKs/*:$(ls /Developer/SDKs/ | tr "\n" ',')"
+ __rvm_log "debug" "/Developer/SDKs/*:$(basename -a /Developer/SDKs/* | tr "\n" ',')"
fi
for file_name in ~/.bash_profile ~/.bashrc ~/.zshrc ; do
if [[ -s "$file_name" ]] ; then
__rvm_log "debug" "$file_name:\n$(grep 'rvm' $file_name)"
@@ -60,11 +60,11 @@
done
__rvm_log "debug" "gem sources:\n$(gem sources | awk '/gems/')"
if [[ -f "$rvm_path/bin/rvm" ]] ; then
- __rvm_log "error" "rvm script in bin! \n$(ls -laht $rvm_path/bin/rvm)"
+ __rvm_log "error" "rvm script in bin! \n$(\ls -laht $rvm_path/bin/rvm)"
fi
}
# Logging functions based on level
# TODO: Allow specification of a base file name to output to.
@@ -126,20 +126,20 @@
__rvm_unset_ruby_variables
unset rvm_ruby_selected_flag rvm_action rvm_irbrc_file rvm_src_path rvm_path rvm_prefix_path rvm_gem_path rvm_command rvm_error_message rvm_gem_set_name rvm_url rvm_config_path rvm_bin_path rvm_force_flag rvm_all_flag rvm_reconfigure_flag rvm_make_flags rvm_bin_flag rvm_load_flag rvm_dump_flag rvm_self_flag rvm_gem_flag rvm_rubygems_flag rvm_debug_flag rvm_delete_flag rvm_summary_flag rvm_test_flag _rvm_spec_flag rvm_json_flag rvm_yaml_flag rvm_shebang_flag rvm_env_flag rvm_tail_flag rvm_use_flag rvm_dir_flag rvm_list_flag rvm_empty_flag rvm_log_path rvm_file_name rvm_ruby_configure rvm_benchmark_flag
}
__rvm_unset_ruby_variables() {
- unset rvm_ruby_interpreter rvm_ruby_version rvm_ruby_repo_url rvm_ruby_package_name rvm_ruby_patch_level rvm_ruby_make rvm_ruby_make_install rvm_ruby_revision rvm_ruby_tag rvm_major_version rvm_minor_version rvm_ruby_gem_home rvm_ruby_binary rvm_ruby_home rvm_ruby_log_path rvm_ruby_src_path rvm_ruby_irbrc rvm_ruby_selected_flag rvm_ruby_string rvm_ruby_string rvm_ruby_src_path rvm_ruby_repo_url rvm_major_version rvm_minor_version rvm_ruby_gem_home rvm_head_flag
+ unset rvm_ruby_interpreter rvm_ruby_version rvm_ruby_repo_url rvm_ruby_package_name rvm_ruby_patch_level rvm_ruby_make rvm_ruby_make_install rvm_ruby_revision rvm_ruby_tag rvm_major_version rvm_minor_version rvm_ruby_gem_home rvm_ruby_binary rvm_ruby_home rvm_ruby_log_path rvm_ruby_src_path rvm_ruby_irbrc rvm_ruby_selected_flag rvm_ruby_string rvm_ruby_string rvm_ruby_src_path rvm_ruby_repo_url rvm_major_version rvm_minor_version rvm_ruby_gem_home rvm_head_flag rvm_ruby_configure
}
# TODO: root user loadng of /etc/rvmrc
function __rvm_load_rvmrc {
if [[ -s ~/.rvmrc ]] ; then source ~/.rvmrc ; fi
}
function __rvm_bin_scripts {
- for rvm_ruby_binary in $(/bin/ls $rvm_path/*/bin/ruby 2> /dev/null) ; do
+ for rvm_ruby_binary in $(\ls $rvm_path/*/bin/ruby 2> /dev/null) ; do
if [[ -x "$rvm_ruby_binary" ]] ; then
rvm_ruby_string=$(dirname "$rvm_ruby_binary" | xargs dirname | xargs basename)
__rvm_select
__rvm_bin_script
fi
@@ -383,61 +383,62 @@
__rvm_list() {
if [[ ! -z "$rvm_all_flag" ]] ; then
svn list http://svn.ruby-lang.org/repos/ruby/tags/ | grep 'v1_[8|9]' | sed 's#^v1_##' | sed 's#/$##' | awk -F'_' '{print "1."$1"."$2 " -l "$3}' | sed 's#p$##'
echo -e "jruby 1.2.0\njruby 1.3.0\njruby (1.3.1, the default)\njruby 1.4.1\njruby --head"
- echo -e "rbx head (rubinius head, the default)\nrbx head --jit"
- echo -e "ree 1.8.6 --head\nree (1.8.7, the default)"
+ echo -e "rbx (rubinius head, the default)\nrbx-head --jit"
+ echo -e "ree 1.8.6-head\nree (1.8.7, the default)"
+ echo -e "macruby-nightly (macruby-nightly, the default)\nmacruby-head"
echo -e "mput head (shyouhei head, the default)"
else
current_ruby="$(which ruby | xargs dirname | xargs dirname | xargs basename 2> /dev/null)"
echo -e "\nruby:\n"
- for version in $(/bin/ls -l $rvm_path/ 2> /dev/null | awk '/ ruby-[1-2].*/ { print $NF }') ; do
+ for version in $(\ls -l $rvm_path/ 2> /dev/null | awk '/ ruby-[1-2].*/ { print $NF }') ; do
string=$($rvm_path/$version/bin/ruby -v)
if [[ "$version" = "$current_ruby" ]] ; then
echo -e "=> $version : $string"
selected="1"
else
echo -e " $version : $string"
fi
done ; unset version
echo -e "\nree:\n"
- for version in $(/bin/ls $rvm_path/ 2> /dev/null | awk '/ree-.*/ { print $NF }') ; do
+ for version in $(\ls $rvm_path/ 2> /dev/null | awk '/ree-.*/ { print $NF }') ; do
string="$($rvm_path/$version/bin/ruby -v | tr "\n" ' ' )"
if [[ "$version" = "$current_ruby" ]] ; then
echo -e "=> $version : $string"
selected="1"
else
echo -e " $version : $string"
fi
done ; unset version
echo -e "\nmput:\n"
- for version in $(/bin/ls $rvm_path/ 2> /dev/null | awk '/mput-.*/ { print $NF }') ; do
+ for version in $(\ls $rvm_path/ 2> /dev/null | awk '/mput-.*/ { print $NF }') ; do
string="$($rvm_path/$version/bin/ruby -v | tr "\n" ' ' )"
if [[ "$version" = "$current_ruby" ]] ; then
echo -e "=> $version : $string"
selected="1"
else
echo -e " $version : $string"
fi
done ; unset version
echo -e "\njruby:\n"
- for version in $(/bin/ls -l $rvm_path/ 2> /dev/null | awk '/jruby-.*/ { print $NF }') ; do
+ for version in $(\ls $rvm_path/ 2> /dev/null | awk '/jruby-.*/ { print $NF }') ; do
string=$($rvm_path/$version/bin/ruby -v)
if [[ "$version" = "$current_ruby" ]] ; then
echo -e "=> $version : $string"
selected="1"
else
echo -e " $version : $string"
fi
done ; unset version
echo -e "\nrbx:\n"
- # for version in $(/bin/ls $rvm_path/ 2> /dev/null | awk '/rbx-.*/ { print $NF }') ; do
+ # for version in $(\ls $rvm_path/ 2> /dev/null | awk '/rbx-.*/ { print $NF }') ; do
for version in "rbx-head" ; do
if [[ -f "$rvm_path/$version/bin/ruby" ]] ; then
string="$($rvm_path/$version/bin/ruby -v | tr "\n" ' ' )"
if [[ "$version" = "$current_ruby" ]] ; then
echo -e "=> $version : $string"
@@ -449,11 +450,11 @@
done ; unset version
if [[ "Darwin" = "$(uname)" ]] ; then
echo -e "\nmacruby:\n"
- for version in $(/bin/ls $rvm_path/ 2> /dev/null | awk '/macruby-.*/ { print $NF }') ; do
+ for version in $(\ls $rvm_path/ 2> /dev/null | awk '/macruby-.*/ { print $NF }') ; do
string="$($rvm_path/$version/bin/ruby -v | tr "\n" ' ' )"
if [[ "$version" = "$current_ruby" ]] ; then
echo -e "=> $version : $string"
selected="1"
else
@@ -648,11 +649,11 @@
do # Keep this on second line damnit!
if [[ -x "$bin_line" ]] ; then
rvm_ruby_string="$(dirname $bin_line | xargs dirname | xargs basename)"
__rvm_ruby_do
fi
- done < <(/bin/ls $rvm_path/*/bin/ruby 2> /dev/null)
+ done < <(\ls $rvm_path/*/bin/ruby 2> /dev/null)
fi
if [[ ! -z "$rvm_summary_flag" ]] ; then __rvm_summary ; fi
if [[ ! -z "$rvm_yaml_flag" ]] ; then __rvm_yaml ; fi
if [[ ! -z "$rvm_json_flag" ]] ; then __rvm_json ; fi
@@ -785,11 +786,11 @@
__rvm_log "info" "Retrieving $package-$version.$archive_format"
__rvm_fetch "ftp://ftp.gnu.org/gnu/readline/$package-$version.$archive_format"
__rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_src_path" "Extracting $package-$version.$archive_format"
cd "$rvm_src_path/$package-$version"
if [[ "Darwin" = "$(uname)" ]] ; then
- #sdk=$(ls -t /Developer/SDKs/ | head -n 1)
+ #sdk=$(\ls -t /Developer/SDKs/ | head -n 1)
#CFLAGS="-isysroot /Developer/SDKs/$sdk -arch i386 -arch x86_64"
#LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/$sdk -arch i386 -arch x86_64"
#export CFLAGS LDFLAGS
__rvm_run "$package/configure" "./configure --prefix=$rvm_path/usr --disable-dependency-tracking --disable-static --enable-shared" "Configuring $package"
else
@@ -876,11 +877,11 @@
elif [[ "-arch i386" = "$rvm_archflags" ]] ; then
rvm_ruby_configure="${rvm_ruby_configure} --build=i386-apple-darwin$(uname -r) --host=i386-apple-darwin$(uname -r)"
fi
if [[ -z "$rvm_sdk" ]] ; then
- rvm_sdk="$(ls /Developer/SDKs/ | sort | tail -n 1)"
+ rvm_sdk="$(basename -a /Developer/SDKs/* | sort | tail -n 1)"
fi
CFLAGS="-isysroot /Developer/SDKs/$rvm_sdk $rvm_archflags" ; export CFLAGS
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
@@ -893,19 +894,19 @@
if [[ -d "spec/" ]] ; then spec_timestamp=$(timestamp "spec/") ; fi
while : ; do
changed_test_files=() ; changed_spec_files=()
if [[ -d "test/" ]] ; then
- test_files=($(/bin/ls test/**/*_test.rb))
+ test_files=($(\ls test/**/*_test.rb))
for file in "${test_files[@]}"; do
if [[ $(timestamp $file) -gt $timestamp ]] ; then
array_push $changed_test_files
fi
done
fi
if [[ -d "spec/" ]] ; then
- spec_files=($(/bin/ls spec/**/*_spec.rb))
+ spec_files=($(\ls spec/**/*_spec.rb))
for file in "${spec_files[@]}"; do
if [[ $(timestamp $file) -gt $timestamp ]] ; then
array_push $changed_spec_files
fi
done