rvm 0.0.52 → 0.0.53
Sign up to get free protection for your applications and to get access to all the features.
- data/install +7 -59
- data/lib/VERSION.yml +1 -1
- data/rvm.gemspec +2 -2
- data/scripts/cli +1 -1
- data/scripts/install +7 -59
- data/scripts/ruby-installer +14 -9
- data/scripts/rvm +2 -0
- data/scripts/rvm-install +7 -59
- data/scripts/selector +0 -1
- data/scripts/update +7 -59
- data/scripts/utility +20 -16
- metadata +2 -2
data/install
CHANGED
@@ -31,66 +31,14 @@ for file_name in rvm-prompt gemsync ; do
|
|
31
31
|
chmod +x $rvm_path/bin/$file_name
|
32
32
|
done ; unset file_name
|
33
33
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
echo
|
39
|
-
|
40
|
-
if [ "${response:0:1}" = "s" ] ; then
|
41
|
-
echo 'w00t!'
|
42
|
-
break
|
43
|
-
elif [ "${response:0:1}" = "m" ] ; then
|
44
|
-
echo -e " Please make sure that this line is in place."
|
45
|
-
break
|
46
|
-
fi
|
47
|
-
done
|
48
|
-
|
49
|
-
if [ "${response:0:1}" = "s" ] ; then
|
50
|
-
|
51
|
-
while : ; do
|
52
|
-
echo -n -e "$question Do you use b(a)sh or (z)sh or b(o)th for your shell (the default on most *nix systems is bash, press control + C to cancel the installation)\n(a/z/o)? "
|
53
|
-
read response
|
54
|
-
if [ "${response:0:1}" = "a" ] ; then
|
55
|
-
user_shell="bash"
|
56
|
-
break
|
57
|
-
elif [ "${response:0:1}" = "z" ] ; then
|
58
|
-
user_shell="zsh"
|
59
|
-
break
|
60
|
-
elif [ "${response:0:1}" = "o" ] ; then
|
61
|
-
user_shell="both"
|
62
|
-
break
|
63
|
-
fi
|
64
|
-
done
|
65
|
-
fi
|
66
|
-
else
|
67
|
-
user_shell="both"
|
68
|
-
fi
|
69
|
-
|
70
|
-
if [ "$user_shell" = "bash" -o "$user_shell" = "both" ] ; then
|
71
|
-
touch ~/.bash_profile
|
72
|
-
if [ -z "`grep '\.rvm/scripts/rvm' ~/.bash_profile`" ] ; then
|
73
|
-
echo "Adding 'if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi' to your ~/.bash_profile."
|
74
|
-
echo -e "\n" >> ~/.bash_profile
|
75
|
-
echo "if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi" >> ~/.bash_profile
|
76
|
-
fi
|
77
|
-
touch ~/.bashrc
|
78
|
-
if [ -z "`grep '\.rvm/scripts/rvm' ~/.bashrc`" ] ; then
|
79
|
-
echo "Adding 'if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi' to your ~/.bashrc."
|
80
|
-
echo -e "\n" >> ~/.bashrc
|
81
|
-
echo "if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi" >> ~/.bashrc
|
34
|
+
if [ -z "$rvm_loaded_flag" ] ; then
|
35
|
+
for rcfile in .bash_profile .bashrc .zshrc ; do
|
36
|
+
if [ ! -e ~/$rcfile ] ; then touch ~/$rcfile ; fi
|
37
|
+
if [ -z "$(awk '/\.rvm\/scripts\/rvm/' ~/$rcfile)" ] ; then
|
38
|
+
echo "Adding 'if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi' to your ~/$rcfile."
|
39
|
+
echo -e "\n# rvm installer added line:\nif [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi\n" >> ~/$rcfile
|
82
40
|
fi
|
83
|
-
|
84
|
-
fi
|
85
|
-
|
86
|
-
if [ "$user_shell" = "zsh" -o "$user_shell" = "both" ] ; then
|
87
|
-
touch ~/.zshrc
|
88
|
-
if [ -z "`grep '\.rvm/scripts/rvm' ~/.zshrc`" ] ; then
|
89
|
-
echo "Adding 'if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi' to your ~/.zshrc."
|
90
|
-
echo -e "\n" >> ~/.zshrc
|
91
|
-
echo "if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi" >> ~/.zshrc
|
92
|
-
fi
|
93
|
-
fi
|
41
|
+
done
|
94
42
|
fi
|
95
43
|
|
96
44
|
echo -e "\n Ensuring that rvm script location in $file is scripts/rvm not bin/rvm for: ~/.bash_profile, ~/.bashrc, ~/.zshrc..."
|
data/lib/VERSION.yml
CHANGED
data/rvm.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{rvm}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.53"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Wayne E. Seguin"]
|
12
|
-
s.date = %q{2009-
|
12
|
+
s.date = %q{2009-10-01}
|
13
13
|
s.default_executable = %q{rvm-install}
|
14
14
|
s.description = %q{Manages Ruby interpreter installations and switching between them.}
|
15
15
|
s.email = %q{wayneeseguin@gmail.com}
|
data/scripts/cli
CHANGED
@@ -5,7 +5,7 @@ function __rvm_meta {
|
|
5
5
|
rvm_meta_author_email="wayneeseguin@gmail.com"
|
6
6
|
rvm_meta_website="http://rvm.beginrescueend.com/"
|
7
7
|
rvm_meta_version="`cat $rvm_path/lib/VERSION.yml | tail -n 3 | sed 's/^.*: //g' | tr "\n" '.' | sed 's/\.$//'`"
|
8
|
-
rvm_meta_updated="2009.
|
8
|
+
rvm_meta_updated="2009.10.01"
|
9
9
|
}
|
10
10
|
|
11
11
|
function __rvm_version { __rvm_meta ; echo "rvm $rvm_meta_version ($rvm_meta_updated) [$rvm_meta_website]" ; }
|
data/scripts/install
CHANGED
@@ -31,66 +31,14 @@ for file_name in rvm-prompt gemsync ; do
|
|
31
31
|
chmod +x $rvm_path/bin/$file_name
|
32
32
|
done ; unset file_name
|
33
33
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
echo
|
39
|
-
|
40
|
-
if [ "${response:0:1}" = "s" ] ; then
|
41
|
-
echo 'w00t!'
|
42
|
-
break
|
43
|
-
elif [ "${response:0:1}" = "m" ] ; then
|
44
|
-
echo -e " Please make sure that this line is in place."
|
45
|
-
break
|
46
|
-
fi
|
47
|
-
done
|
48
|
-
|
49
|
-
if [ "${response:0:1}" = "s" ] ; then
|
50
|
-
|
51
|
-
while : ; do
|
52
|
-
echo -n -e "$question Do you use b(a)sh or (z)sh or b(o)th for your shell (the default on most *nix systems is bash, press control + C to cancel the installation)\n(a/z/o)? "
|
53
|
-
read response
|
54
|
-
if [ "${response:0:1}" = "a" ] ; then
|
55
|
-
user_shell="bash"
|
56
|
-
break
|
57
|
-
elif [ "${response:0:1}" = "z" ] ; then
|
58
|
-
user_shell="zsh"
|
59
|
-
break
|
60
|
-
elif [ "${response:0:1}" = "o" ] ; then
|
61
|
-
user_shell="both"
|
62
|
-
break
|
63
|
-
fi
|
64
|
-
done
|
65
|
-
fi
|
66
|
-
else
|
67
|
-
user_shell="both"
|
68
|
-
fi
|
69
|
-
|
70
|
-
if [ "$user_shell" = "bash" -o "$user_shell" = "both" ] ; then
|
71
|
-
touch ~/.bash_profile
|
72
|
-
if [ -z "`grep '\.rvm/scripts/rvm' ~/.bash_profile`" ] ; then
|
73
|
-
echo "Adding 'if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi' to your ~/.bash_profile."
|
74
|
-
echo -e "\n" >> ~/.bash_profile
|
75
|
-
echo "if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi" >> ~/.bash_profile
|
76
|
-
fi
|
77
|
-
touch ~/.bashrc
|
78
|
-
if [ -z "`grep '\.rvm/scripts/rvm' ~/.bashrc`" ] ; then
|
79
|
-
echo "Adding 'if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi' to your ~/.bashrc."
|
80
|
-
echo -e "\n" >> ~/.bashrc
|
81
|
-
echo "if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi" >> ~/.bashrc
|
34
|
+
if [ -z "$rvm_loaded_flag" ] ; then
|
35
|
+
for rcfile in .bash_profile .bashrc .zshrc ; do
|
36
|
+
if [ ! -e ~/$rcfile ] ; then touch ~/$rcfile ; fi
|
37
|
+
if [ -z "$(awk '/\.rvm\/scripts\/rvm/' ~/$rcfile)" ] ; then
|
38
|
+
echo "Adding 'if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi' to your ~/$rcfile."
|
39
|
+
echo -e "\n# rvm installer added line:\nif [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi\n" >> ~/$rcfile
|
82
40
|
fi
|
83
|
-
|
84
|
-
fi
|
85
|
-
|
86
|
-
if [ "$user_shell" = "zsh" -o "$user_shell" = "both" ] ; then
|
87
|
-
touch ~/.zshrc
|
88
|
-
if [ -z "`grep '\.rvm/scripts/rvm' ~/.zshrc`" ] ; then
|
89
|
-
echo "Adding 'if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi' to your ~/.zshrc."
|
90
|
-
echo -e "\n" >> ~/.zshrc
|
91
|
-
echo "if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi" >> ~/.zshrc
|
92
|
-
fi
|
93
|
-
fi
|
41
|
+
done
|
94
42
|
fi
|
95
43
|
|
96
44
|
echo -e "\n Ensuring that rvm script location in $file is scripts/rvm not bin/rvm for: ~/.bash_profile, ~/.bashrc, ~/.zshrc..."
|
data/scripts/ruby-installer
CHANGED
@@ -16,12 +16,13 @@ function __rvm_install_source {
|
|
16
16
|
if [ -z "$rvm_ruby_tag" -a -z "$rvm_ruby_rev" ] ; then
|
17
17
|
if [ ! -f $rvm_archives_path/$rvm_ruby_package_name.tar.gz ] ; then
|
18
18
|
rvm_url="${rvm_url:-"ftp://ftp.ruby-lang.org/pub/ruby/1.$rvm_major_version/$rvm_ruby_package_name.tar.gz"}"
|
19
|
-
|
20
|
-
|
21
|
-
mkdir -p $rvm_ruby_src_path # Is this line necessary considering -C below? v
|
22
|
-
__rvm_run "extract" "tar xzf $rvm_archives_path/$rvm_ruby_package_name.tar.gz -C $rvm_source_path" "Extracting $rvm_ruby_package_name ..."
|
19
|
+
__rvm_log "info" "Downloading $rvm_ruby_package_name, this may take a while depending on your connection..."
|
20
|
+
__rvm_fetch $rvm_url
|
23
21
|
if [ $? -gt 0 ] ; then result=$? ; return $result ; fi
|
24
22
|
fi
|
23
|
+
mkdir -p $rvm_ruby_src_path # Is this line necessary considering -C below? v
|
24
|
+
__rvm_run "extract" "tar xzf $rvm_archives_path/$rvm_ruby_package_name.tar.gz -C $rvm_source_path" "Extracting $rvm_ruby_package_name ..."
|
25
|
+
if [ $? -gt 0 ] ; then result=$? ; return $result ; fi
|
25
26
|
else
|
26
27
|
__rvm_log "info" "Retrieving Ruby from $rvm_url"
|
27
28
|
if [ ! -z "`echo $rvm_url | awk '/^git/'`" ] ; then
|
@@ -41,7 +42,7 @@ function __rvm_install_source {
|
|
41
42
|
else
|
42
43
|
if [ -z "$rvm_ruby_rev" ] ; then
|
43
44
|
# TODO: Check if tag v is valid
|
44
|
-
rvm_url
|
45
|
+
rvm_url="$rvm_ruby_repo_url/tags/$rvm_ruby_tag"
|
45
46
|
rvm_rev=""
|
46
47
|
else
|
47
48
|
if [ "$rvm_ruby_rev" = "head" -o "$rvm_ruby_rev" = "trunk" ] ; then
|
@@ -125,7 +126,8 @@ function __rvm_install_ruby {
|
|
125
126
|
macruby)
|
126
127
|
if [ "`uname`" = "Darwin" ] ; then
|
127
128
|
rvm_url=`__rvm_db "macruby_nightly_url"`
|
128
|
-
|
129
|
+
__rvm_log "info" "Retrieving latest macruby" # $rvm_archives_path/macruby_nightly.pkg
|
130
|
+
__rvm_fetch $rvm_url
|
129
131
|
mv $rvm_archives_path/latest $rvm_archives_path/macruby_nightly.pkg
|
130
132
|
__rvm_run "macruby/extract" "xar -x -f $rvm_archives_path/macruby_nightly.pkg -C $rvm_ruby_home" "Extracting macruby nightly package."
|
131
133
|
else
|
@@ -143,7 +145,8 @@ function __rvm_install_ruby {
|
|
143
145
|
if [ -d $rvm_ruby_src_path ] ; then
|
144
146
|
cd $rvm_ruby_src_path
|
145
147
|
else
|
146
|
-
|
148
|
+
__rvm_log "Downloading $rvm_ruby_package_name, this may take a while depending on your connection..."
|
149
|
+
__rvm_fetch $rvm_url
|
147
150
|
if [ $? -gt 0 ] ; then result=$? ; return $result ; fi
|
148
151
|
mkdir -p $rvm_ruby_src_path
|
149
152
|
__rvm_run "extract" "tar xzf $rvm_archives_path/$rvm_ruby_package_name.tar.gz -C $rvm_source_path" "Extracting $rvm_ruby_package_name..."
|
@@ -283,7 +286,8 @@ RubyWrapper
|
|
283
286
|
if [ -z "$rvm_force_flag" -a -f $rvm_package_file -a -s $rvm_package_file ] ; then
|
284
287
|
__rvm_log "info" "It appears that $rvm_package_file has already been downloaded, skipping. Use --force to force re-download."
|
285
288
|
else
|
286
|
-
|
289
|
+
__rvm_log "info" "Downloading $rvm_package_file, this may take a while depending on your connection..."
|
290
|
+
__rvm_fetch $rvm_url
|
287
291
|
fi
|
288
292
|
rvm_unzip=`which unzip`
|
289
293
|
if [ $? -ne 0 ] ; then
|
@@ -483,7 +487,8 @@ function __rvm_rubygems_setup {
|
|
483
487
|
if [ -d $rvm_source_path/$rvm_gem_package_name ] ; then
|
484
488
|
cd $rvm_source_path/$rvm_gem_package_name
|
485
489
|
else
|
486
|
-
|
490
|
+
__rvm_log "info" "Retrieving $rvm_gem_package_name"
|
491
|
+
__rvm_fetch $rvm_gem_url
|
487
492
|
mkdir -p $rvm_source_path/$rvm_gem_package_name
|
488
493
|
__rvm_run "rubygems.extract" "tar zxf $rvm_archives_path/$rvm_gem_package_name.tgz -C $rvm_source_path" "Extracting $rvm_gem_package_name"
|
489
494
|
fi
|
data/scripts/rvm
CHANGED
data/scripts/rvm-install
CHANGED
@@ -31,66 +31,14 @@ for file_name in rvm-prompt gemsync ; do
|
|
31
31
|
chmod +x $rvm_path/bin/$file_name
|
32
32
|
done ; unset file_name
|
33
33
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
echo
|
39
|
-
|
40
|
-
if [ "${response:0:1}" = "s" ] ; then
|
41
|
-
echo 'w00t!'
|
42
|
-
break
|
43
|
-
elif [ "${response:0:1}" = "m" ] ; then
|
44
|
-
echo -e " Please make sure that this line is in place."
|
45
|
-
break
|
46
|
-
fi
|
47
|
-
done
|
48
|
-
|
49
|
-
if [ "${response:0:1}" = "s" ] ; then
|
50
|
-
|
51
|
-
while : ; do
|
52
|
-
echo -n -e "$question Do you use b(a)sh or (z)sh or b(o)th for your shell (the default on most *nix systems is bash, press control + C to cancel the installation)\n(a/z/o)? "
|
53
|
-
read response
|
54
|
-
if [ "${response:0:1}" = "a" ] ; then
|
55
|
-
user_shell="bash"
|
56
|
-
break
|
57
|
-
elif [ "${response:0:1}" = "z" ] ; then
|
58
|
-
user_shell="zsh"
|
59
|
-
break
|
60
|
-
elif [ "${response:0:1}" = "o" ] ; then
|
61
|
-
user_shell="both"
|
62
|
-
break
|
63
|
-
fi
|
64
|
-
done
|
65
|
-
fi
|
66
|
-
else
|
67
|
-
user_shell="both"
|
68
|
-
fi
|
69
|
-
|
70
|
-
if [ "$user_shell" = "bash" -o "$user_shell" = "both" ] ; then
|
71
|
-
touch ~/.bash_profile
|
72
|
-
if [ -z "`grep '\.rvm/scripts/rvm' ~/.bash_profile`" ] ; then
|
73
|
-
echo "Adding 'if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi' to your ~/.bash_profile."
|
74
|
-
echo -e "\n" >> ~/.bash_profile
|
75
|
-
echo "if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi" >> ~/.bash_profile
|
76
|
-
fi
|
77
|
-
touch ~/.bashrc
|
78
|
-
if [ -z "`grep '\.rvm/scripts/rvm' ~/.bashrc`" ] ; then
|
79
|
-
echo "Adding 'if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi' to your ~/.bashrc."
|
80
|
-
echo -e "\n" >> ~/.bashrc
|
81
|
-
echo "if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi" >> ~/.bashrc
|
34
|
+
if [ -z "$rvm_loaded_flag" ] ; then
|
35
|
+
for rcfile in .bash_profile .bashrc .zshrc ; do
|
36
|
+
if [ ! -e ~/$rcfile ] ; then touch ~/$rcfile ; fi
|
37
|
+
if [ -z "$(awk '/\.rvm\/scripts\/rvm/' ~/$rcfile)" ] ; then
|
38
|
+
echo "Adding 'if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi' to your ~/$rcfile."
|
39
|
+
echo -e "\n# rvm installer added line:\nif [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi\n" >> ~/$rcfile
|
82
40
|
fi
|
83
|
-
|
84
|
-
fi
|
85
|
-
|
86
|
-
if [ "$user_shell" = "zsh" -o "$user_shell" = "both" ] ; then
|
87
|
-
touch ~/.zshrc
|
88
|
-
if [ -z "`grep '\.rvm/scripts/rvm' ~/.zshrc`" ] ; then
|
89
|
-
echo "Adding 'if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi' to your ~/.zshrc."
|
90
|
-
echo -e "\n" >> ~/.zshrc
|
91
|
-
echo "if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi" >> ~/.zshrc
|
92
|
-
fi
|
93
|
-
fi
|
41
|
+
done
|
94
42
|
fi
|
95
43
|
|
96
44
|
echo -e "\n Ensuring that rvm script location in $file is scripts/rvm not bin/rvm for: ~/.bash_profile, ~/.bashrc, ~/.zshrc..."
|
data/scripts/selector
CHANGED
@@ -147,7 +147,6 @@ function __rvm_select {
|
|
147
147
|
rvm_selected=1
|
148
148
|
|
149
149
|
export rvm_ruby_interpreter rvm_ruby_version rvm_ruby_repo_url rvm_ruby_package_name rvm_url rvm_ruby_patch_level rvm_ruby_configure rvm_ruby_make rvm_ruby_make_install rvm_ruby_rev rvm_ruby_tag rvm_major_version rvm_minor_version rvm_gem_set_name rvm_gem_path rvm_gem_home rvm_path rvm_source_path rvm_bin_path rvm_ruby_binary rvm_ruby_home rvm_log_path rvm_ruby_log_path rvm_source_path rvm_ruby_src_path rvm_ruby_irbrc rvm_selected rvm_ruby_string
|
150
|
-
|
151
150
|
else
|
152
151
|
rvm_gem_home=$GEM_HOME
|
153
152
|
fi
|
data/scripts/update
CHANGED
@@ -31,66 +31,14 @@ for file_name in rvm-prompt gemsync ; do
|
|
31
31
|
chmod +x $rvm_path/bin/$file_name
|
32
32
|
done ; unset file_name
|
33
33
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
echo
|
39
|
-
|
40
|
-
if [ "${response:0:1}" = "s" ] ; then
|
41
|
-
echo 'w00t!'
|
42
|
-
break
|
43
|
-
elif [ "${response:0:1}" = "m" ] ; then
|
44
|
-
echo -e " Please make sure that this line is in place."
|
45
|
-
break
|
46
|
-
fi
|
47
|
-
done
|
48
|
-
|
49
|
-
if [ "${response:0:1}" = "s" ] ; then
|
50
|
-
|
51
|
-
while : ; do
|
52
|
-
echo -n -e "$question Do you use b(a)sh or (z)sh or b(o)th for your shell (the default on most *nix systems is bash, press control + C to cancel the installation)\n(a/z/o)? "
|
53
|
-
read response
|
54
|
-
if [ "${response:0:1}" = "a" ] ; then
|
55
|
-
user_shell="bash"
|
56
|
-
break
|
57
|
-
elif [ "${response:0:1}" = "z" ] ; then
|
58
|
-
user_shell="zsh"
|
59
|
-
break
|
60
|
-
elif [ "${response:0:1}" = "o" ] ; then
|
61
|
-
user_shell="both"
|
62
|
-
break
|
63
|
-
fi
|
64
|
-
done
|
65
|
-
fi
|
66
|
-
else
|
67
|
-
user_shell="both"
|
68
|
-
fi
|
69
|
-
|
70
|
-
if [ "$user_shell" = "bash" -o "$user_shell" = "both" ] ; then
|
71
|
-
touch ~/.bash_profile
|
72
|
-
if [ -z "`grep '\.rvm/scripts/rvm' ~/.bash_profile`" ] ; then
|
73
|
-
echo "Adding 'if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi' to your ~/.bash_profile."
|
74
|
-
echo -e "\n" >> ~/.bash_profile
|
75
|
-
echo "if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi" >> ~/.bash_profile
|
76
|
-
fi
|
77
|
-
touch ~/.bashrc
|
78
|
-
if [ -z "`grep '\.rvm/scripts/rvm' ~/.bashrc`" ] ; then
|
79
|
-
echo "Adding 'if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi' to your ~/.bashrc."
|
80
|
-
echo -e "\n" >> ~/.bashrc
|
81
|
-
echo "if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi" >> ~/.bashrc
|
34
|
+
if [ -z "$rvm_loaded_flag" ] ; then
|
35
|
+
for rcfile in .bash_profile .bashrc .zshrc ; do
|
36
|
+
if [ ! -e ~/$rcfile ] ; then touch ~/$rcfile ; fi
|
37
|
+
if [ -z "$(awk '/\.rvm\/scripts\/rvm/' ~/$rcfile)" ] ; then
|
38
|
+
echo "Adding 'if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi' to your ~/$rcfile."
|
39
|
+
echo -e "\n# rvm installer added line:\nif [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi\n" >> ~/$rcfile
|
82
40
|
fi
|
83
|
-
|
84
|
-
fi
|
85
|
-
|
86
|
-
if [ "$user_shell" = "zsh" -o "$user_shell" = "both" ] ; then
|
87
|
-
touch ~/.zshrc
|
88
|
-
if [ -z "`grep '\.rvm/scripts/rvm' ~/.zshrc`" ] ; then
|
89
|
-
echo "Adding 'if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi' to your ~/.zshrc."
|
90
|
-
echo -e "\n" >> ~/.zshrc
|
91
|
-
echo "if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi" >> ~/.zshrc
|
92
|
-
fi
|
93
|
-
fi
|
41
|
+
done
|
94
42
|
fi
|
95
43
|
|
96
44
|
echo -e "\n Ensuring that rvm script location in $file is scripts/rvm not bin/rvm for: ~/.bash_profile, ~/.bashrc, ~/.zshrc..."
|
data/scripts/utility
CHANGED
@@ -56,13 +56,13 @@ function __rvm_log {
|
|
56
56
|
case "$1" in
|
57
57
|
debug) shift ;
|
58
58
|
if [ ! -z "$rvm_debug_flag" ] ; then
|
59
|
-
echo -e "\033[0;35m<
|
59
|
+
echo -e "\033[0;35m<d>\033[0m $* \033[0;35m</d> \033[0m "
|
60
60
|
fi
|
61
61
|
;;
|
62
|
-
info) shift ; echo -e "\033[0;32m<
|
63
|
-
warn) shift ; echo -e "\033[0;33m<
|
64
|
-
error) shift ; echo -e "\033[0;31m<
|
65
|
-
fail) shift ; echo -e "\033[0;31m<
|
62
|
+
info) shift ; echo -e "\033[0;32m<i>\033[0m $* \033[0;32m</i> \033[0m " ;;
|
63
|
+
warn) shift ; echo -e "\033[0;33m<w>\033[0m $* \033[0;33m</w> \033[0m " ;;
|
64
|
+
error) shift ; echo -e "\033[0;31m<e>\033[0m $* \033[0;31m</e> \033[0m " ;;
|
65
|
+
fail) shift ; echo -e "\033[0;31m<f>\033[0m $* \033[0;31m</f> \033[0m " ; __rvm_pushpop ; return 1 ;;
|
66
66
|
*) echo -e "$*"
|
67
67
|
esac
|
68
68
|
}
|
@@ -527,7 +527,10 @@ function __rvm_ruby_do {
|
|
527
527
|
if [ -x $rvm_ruby_home/bin/$binary ] ; then
|
528
528
|
load_path="$rvm_ruby_home/bin:$rvm_ruby_load_path"
|
529
529
|
if [ "$binary" = "ruby" ] ; then
|
530
|
-
|
530
|
+
if [ -z "$(echo $rvm_ruby_args | awk '/\.rb$/')" ] ; then
|
531
|
+
rvm_ruby_args="-S $rvm_ruby_args"
|
532
|
+
fi
|
533
|
+
rvm_command="$rvm_ruby_home/bin/$binary $rvm_ruby_require -I$load_path $rvm_ruby_args"
|
531
534
|
else
|
532
535
|
rvm_command="$rvm_ruby_home/bin/$binary $rvm_ruby_args"
|
533
536
|
fi
|
@@ -537,7 +540,7 @@ function __rvm_ruby_do {
|
|
537
540
|
touch ./log/$rvm_ruby_string/$rvm_action.log ./log/$rvm_ruby_string/$rvm_action.error.log
|
538
541
|
eval "$rvm_command" >> ./log/$rvm_ruby_string/$rvm_action.log 2>> ./log/$rvm_ruby_string/$rvm_action.error.log
|
539
542
|
else
|
540
|
-
echo -e "\n$rvm_ruby_string: $($rvm_ruby_home/bin/$binary -v)"
|
543
|
+
echo -e "\n\n\033[0;32m$rvm_ruby_string: $($rvm_ruby_home/bin/$binary -v | tr "\n" ' ')\033[0m\n"
|
541
544
|
eval "$rvm_command"
|
542
545
|
fi
|
543
546
|
result=$?
|
@@ -652,16 +655,14 @@ function __rvm_json {
|
|
652
655
|
|
653
656
|
function __rvm_benchmark {
|
654
657
|
rvm_code="$(cat <<RubyCode
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
benchmark.report("benchmarking '$rvm_ruby_file'") do
|
659
|
-
|
658
|
+
require "benchmark" \n
|
659
|
+
Benchmark.bmbm do |benchmark| \n
|
660
|
+
benchmark.report("$rvm_ruby_file") do \n
|
660
661
|
RubyCode
|
661
662
|
)"
|
662
|
-
echo "$rvm_code" > $rvm_temp_path/$$.rb
|
663
|
+
echo -e "$rvm_code" > $rvm_temp_path/$$.rb
|
663
664
|
cat $rvm_ruby_file >> $rvm_temp_path/$$.rb
|
664
|
-
echo -e "\n
|
665
|
+
echo -e "\n end \nend\n" >> $rvm_temp_path/$$.rb
|
665
666
|
unset rvm_code
|
666
667
|
rvm_ruby_args="$rvm_temp_path/$$.rb"
|
667
668
|
rvm_action="ruby"
|
@@ -813,7 +814,8 @@ function __rvm_readline_install {
|
|
813
814
|
__rvm_pushpop $rvm_source_path
|
814
815
|
package="readline" ; version="5.2" ; archive_format="tar.gz"
|
815
816
|
# TODO: Figure out how to list, grab and apply the patches
|
816
|
-
|
817
|
+
__rvm_log "info" "Retrieving $package-$version.$archive_format"
|
818
|
+
__rvm_fetch ftp://ftp.gnu.org/gnu/readline/$package-$version.$archive_format"
|
817
819
|
__rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_source_path" "Extracting $package-$version.$archive_format"
|
818
820
|
cd $rvm_source_path/$package-$version
|
819
821
|
if [ "`uname`" = "Darwin" ] ; then
|
@@ -833,7 +835,8 @@ function __rvm_readline_install {
|
|
833
835
|
function __rvm_iconv_install {
|
834
836
|
__rvm_pushpop $rvm_source_path
|
835
837
|
package="libiconv" ; version=1.13.1 ; archive_format="tar.gz"
|
836
|
-
|
838
|
+
__rvm_log "info" "Retrieving $package-$version.$archive_format"
|
839
|
+
__rvm_fetch http://ftp.gnu.org/pub/gnu/libiconv/$package-$version.$archive_format"
|
837
840
|
__rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_source_path" "Extracting $package-$version.$archive_format"
|
838
841
|
cd $rvm_source_path/$package-$version
|
839
842
|
__rvm_run "$package/configure" "./configure --prefix=$rvm_path/usr --disable-static --enable-shared" "Configuring $package."
|
@@ -841,3 +844,4 @@ function __rvm_iconv_install {
|
|
841
844
|
__rvm_run "$package/make.install" "/usr/bin/make install" "Installing $package to $rvm_path/usr"
|
842
845
|
__rvm_pushpop
|
843
846
|
}
|
847
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rvm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.53
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wayne E. Seguin
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-10-01 00:00:00 -04:00
|
13
13
|
default_executable: rvm-install
|
14
14
|
dependencies: []
|
15
15
|
|