rvm 0.1.18 → 0.1.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,15 +14,15 @@ if [[ ! -d "$rvm_ruby_gem_home" ]] && which gem &> /dev/null ; then rvm_ruby_gem
14
14
 
15
15
  trap "if [[ -d $rvm_tmp_path/ ]] && [[ -s $rvm_tmp_path/$$ ]] ; then rm -f $rvm_tmp_path/$$ > /dev/null 2>&1 ; fi ; exit" 0 1 2 3 15
16
16
 
17
- __rvm_gems_name() {
17
+ __rvm_gemset_name() {
18
18
  echo "$(gem env gemdir)" | awk -F'%' '{print $2}'
19
19
  }
20
20
 
21
- __rvm_gems_dir() {
21
+ __rvm_gemset_dir() {
22
22
  echo "$rvm_ruby_gem_home"
23
23
  }
24
24
 
25
- __rvm_gems_create() {
25
+ __rvm_gemset_create() {
26
26
  for gemset in $(echo $gems_args) ; do
27
27
  gem_home="$rvm_ruby_gem_home%${gems_args/ /}"
28
28
  mkdir -p $gem_home
@@ -31,7 +31,7 @@ __rvm_gems_create() {
31
31
  done ; unset gem_home
32
32
  }
33
33
 
34
- __rvm_gems_list() {
34
+ __rvm_gemset_list() {
35
35
  if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select ; fi
36
36
 
37
37
  $rvm_scripts_path/log "info" "gems(ets) : for $rvm_ruby_string (found in $rvm_gems_path/)"
@@ -49,14 +49,14 @@ __rvm_gems_list() {
49
49
  fi
50
50
  }
51
51
 
52
- __rvm_gems_delete() {
52
+ __rvm_gemset_delete() {
53
53
  if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select ; fi
54
- if [[ ! -z "$rvm_gem_set_name" ]] ; then
55
- gemdir="$rvm_gems_path/$rvm_ruby_string%$rvm_gem_set_name"
54
+ if [[ ! -z "$rvm_gemset_name" ]] ; then
55
+ gemdir="$rvm_gems_path/$rvm_ruby_string%$rvm_gemset_name"
56
56
  if [[ -d "$gemdir" ]] && [[ "$gemdir" != '/' ]] && [[ ! -z "$rvm_force_flag" ]] ; then
57
57
  rm -rf "$gemdir"
58
58
  elif [[ -d "$gemdir" ]] ; then
59
- $rvm_scripts_path/log "warn" "Are you SURE you wish to remove the entire gemset directory '$rvm_gem_set_name' ($gemdir)?"
59
+ $rvm_scripts_path/log "warn" "Are you SURE you wish to remove the entire gemset directory '$rvm_gemset_name' ($gemdir)?"
60
60
  echo -n "(anything other than 'yes' will cancel) > "
61
61
  read response
62
62
  if [[ "yes" = "$response" ]] ; then
@@ -72,13 +72,13 @@ __rvm_gems_delete() {
72
72
  fi
73
73
  }
74
74
 
75
- __rvm_gems_empty() {
75
+ __rvm_gemset_empty() {
76
76
  if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select ; fi
77
77
  gemdir="$rvm_ruby_gem_home"
78
78
  if [[ -d "$gemdir" ]] && [[ "$gemdir" != '/' ]] && [[ ! -z "$rvm_force_flag" ]] ; then
79
79
  cd $gemdir && rm -rf ./bin/* ./doc/* ./gems/* ./specifications/*
80
80
  elif [[ -d "$gemdir" ]] ; then
81
- $rvm_scripts_path/log "warn" "Are you SURE you wish to remove the installed gems for gemset '%$rvm_gem_set_name' ($gemdir)?"
81
+ $rvm_scripts_path/log "warn" "Are you SURE you wish to remove the installed gems for gemset '%$rvm_gemset_name' ($gemdir)?"
82
82
  echo -n "(anything other than 'yes' will cancel) > "
83
83
  read response
84
84
  if [[ "yes" = "$response" ]] ; then
@@ -92,7 +92,7 @@ __rvm_gems_empty() {
92
92
  }
93
93
 
94
94
  # Migrate gemsets from ruby X to ruby Y
95
- __rvm_gems_copy() {
95
+ __rvm_gemset_copy() {
96
96
  source_ruby="$(echo $gems_args | awk '{print $1}')"
97
97
  destination_ruby="$(echo $gems_args | awk '{print $2}')"
98
98
  if [[ -z "$source_ruby" ]] ; then
@@ -118,7 +118,7 @@ __rvm_gems_copy() {
118
118
  unset source_ruby destination_ruby source_path destination_path
119
119
  }
120
120
 
121
- __rvm_gems_export() {
121
+ __rvm_gemset_export() {
122
122
  rvm_file_name="${rvm_file_name:-$gems_args}"
123
123
 
124
124
  if [[ ! -z "$rvm_ruby_gem_home" ]] ; then
@@ -128,8 +128,8 @@ __rvm_gems_export() {
128
128
  fi
129
129
 
130
130
  if [[ -z "$rvm_file_name" ]] ; then
131
- if [[ ! -z "$rvm_gem_set_name" ]] ; then
132
- rvm_file_name="$rvm_gem_set_name.gems"
131
+ if [[ ! -z "$rvm_gemset_name" ]] ; then
132
+ rvm_file_name="$rvm_gemset_name.gems"
133
133
  else
134
134
  rvm_file_name="default.gems"
135
135
  fi
@@ -152,7 +152,7 @@ __rvm_gems_export() {
152
152
  done ; unset file_name
153
153
  }
154
154
 
155
- __rvm_gems_import() {
155
+ __rvm_gemset_import() {
156
156
 
157
157
  if [[ ! -z "$rvm_ruby_gem_home" ]] ; then
158
158
  export GEM_HOME="$rvm_ruby_gem_home"
@@ -161,13 +161,13 @@ __rvm_gems_import() {
161
161
  fi
162
162
 
163
163
  if [[ ! -z "$(echo "$gems_args" | awk '/\.gem.*$/')" ]] ; then
164
- rvm_gem_set_name="$(echo "$gems_args" | sed 's#\.gem.*##g' | sed 's# ##g')"
164
+ rvm_gemset_name="$(echo "$gems_args" | sed 's#\.gem.*##g' | sed 's# ##g')"
165
165
  else
166
- rvm_gem_set_name="$(echo "$gems_args" | sed 's# ##g')"
166
+ rvm_gemset_name="$(echo "$gems_args" | sed 's# ##g')"
167
167
  fi
168
168
 
169
- if [[ -s "$rvm_gem_set_name.gems" ]] ; then
170
- rvm_file_name="$rvm_gem_set_name.gems"
169
+ if [[ -s "$rvm_gemset_name.gems" ]] ; then
170
+ rvm_file_name="$rvm_gemset_name.gems"
171
171
  elif [[ -s "default.gems" ]] ; then
172
172
  rvm_file_name="default.gems"
173
173
  elif [[ -s "system.gems" ]] ; then
@@ -295,7 +295,7 @@ __rvm_gem_install() {
295
295
  }
296
296
 
297
297
  # Output the user's current gem directory.
298
- __rvm_gems_gemdir() {
298
+ __rvm_gemset_gemdir() {
299
299
  if [[ "$rvm_user_flag" -eq 1 ]] ; then
300
300
  echo $(rvm system ; gem env | grep "\- $HOME" | awk '{print $NF}')
301
301
  elif [[ "$rvm_system_flag" -eq 1 ]] ; then
@@ -312,37 +312,37 @@ __rvm_gems_gemdir() {
312
312
  unset GEM_PATH
313
313
 
314
314
  if [[ -z "$(which gem 2>/dev/null)" ]] ; then
315
- $rvm_scripts_path/log "error" "'gem' was not found, cannot perform gem actions."
316
- return 1
315
+ $rvm_scripts_path/log "error" "'gem' was not found, cannot perform gem actions (Do you have an RVM ruby selected?)"
316
+ exit 1
317
317
  fi
318
318
 
319
319
  action="$(echo $* | awk '{print $1}')"
320
320
  gems_args=$(echo "$*" | awk '{$1="" ; print}' | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
321
321
 
322
322
  if [[ "import" = "$action" ]] || [[ "load" = "$action" ]] ; then
323
- __rvm_gems_import
323
+ __rvm_gemset_import
324
324
  elif [[ "export" = "$action" ]] || [[ "dump" = "$action" ]] ; then
325
- __rvm_gems_export
325
+ __rvm_gemset_export
326
326
  elif [[ "create" = "$action" ]] ; then
327
- __rvm_gems_create
327
+ __rvm_gemset_create
328
328
  elif [[ "copy" = "$action" ]] ; then
329
- __rvm_gems_copy
329
+ __rvm_gemset_copy
330
330
  elif [[ "empty" = "$action" ]] ; then
331
- __rvm_gems_empty
331
+ __rvm_gemset_empty
332
332
  elif [[ "delete" = "$action" ]] ; then
333
- __rvm_gems_delete
333
+ __rvm_gemset_delete
334
334
  elif [[ "name" = "$action" ]] ; then
335
- __rvm_gems_name
335
+ __rvm_gemset_name
336
336
  elif [[ "dir" = "$action" ]] ; then
337
- __rvm_gems_dir
337
+ __rvm_gemset_dir
338
338
  elif [[ "list" = "$action" ]] ; then
339
- __rvm_gems_list
339
+ __rvm_gemset_list
340
340
  elif [[ "gemdir" = "$action" ]] ; then
341
- __rvm_gems_gemdir
341
+ __rvm_gemset_gemdir
342
342
  elif [[ "install" = "$action" ]] ; then
343
343
  __rvm_gem_install $*
344
344
  elif [[ "clear" = "$action" ]] ; then
345
- $rvm_scripts_path/log "info" "gems(et) cleared."
345
+ $rvm_scripts_path/log "info" "gemset cleared."
346
346
  exit 0
347
347
  else
348
348
  $rvm_scripts_path/log "error" "Unrecognized gems action '$action'.\n\nValid gems actions are: {create,use,import,export,copy,delete,empty,name,list,gemdir,install}"
@@ -18,8 +18,10 @@ rvm_bin_path="${rvm_bin_path:-"$rvm_path/bin"}"
18
18
 
19
19
  if [[ "root" = "$(whoami)" ]] ; then
20
20
  rvm_gems_path="${rvm_gems_path:-"$rvm_path/gems"}"
21
+ rvm_gems_cache_path="${rvm_gems_cache_path:-"$rvm_gems_path/cache"}"
21
22
  else
22
23
  rvm_gems_path="${rvm_gems_path:-"$HOME/.rvm/gems"}"
24
+ rvm_gems_cache_path="${rvm_gems_cache_path:-"$HOME/.gem/cache"}"
23
25
  fi
24
26
 
25
27
  rvm_rubies_path="${rvm_rubies_path:-"$rvm_path/rubies"}"
@@ -27,7 +29,7 @@ rvm_config_path="${rvm_config_path:-"$rvm_path/config"}"
27
29
  rvm_hooks_path="${rvm_hooks_path:-"$rvm_path/hooks"}"
28
30
  rvm_tmp_path="${rvm_tmp_path:-"$rvm_path/tmp"}"
29
31
  rvm_usr_path="${rvm_usr_path:-"$rvm_path/usr"}"
30
- rvm_symlink_path="${rvm_symlink_path:-/usr/local/bin}"
32
+ rvm_symlink_path="${rvm_symlink_path:-$rvm_prefix/bin}"
31
33
 
32
- export rvm_path rvm_rubies_path rvm_scripts_path rvm_archives_path rvm_src_path rvm_log_path rvm_bin_path rvm_gems_path rvm_config_path rvm_tmp_path rvm_hooks_path
34
+ export rvm_path rvm_rubies_path rvm_scripts_path rvm_archives_path rvm_src_path rvm_log_path rvm_bin_path rvm_gems_path rvm_config_path rvm_tmp_path rvm_hooks_path rvm_gems_cache_path
33
35
 
@@ -35,17 +35,17 @@ while [[ $# -gt 0 ]] ; do
35
35
  esac
36
36
  done
37
37
 
38
- __rvm_load_rvmrc
39
-
40
- if [[ -z "$rvm_path" ]] ; then
41
- unset rvm_path
38
+ if [[ -z "$rvm_prefix" ]] ; then
39
+ __rvm_load_rvmrc
42
40
  if [[ "root" = "$(whoami)" ]] ; then
43
- rvm_path="/usr/local/rvm"
41
+ rvm_prefix="/usr/local/"
44
42
  else
45
- rvm_path="$HOME/.rvm"
43
+ rvm_prefix="$HOME/."
46
44
  fi
47
45
  fi
48
46
 
47
+ if [[ -z "$rvm_path" ]] ; then rvm_path="${rvm_prefix}rvm" ; fi
48
+
49
49
  source scripts/initialize
50
50
  __rvm_initialize
51
51
 
@@ -69,7 +69,7 @@ rvm_scripts_path="${rvm_scripts_path:-"$rvm_path/scripts"}"
69
69
  rvm_config_path="${rvm_config_path:-"$rvm_path/config"}"
70
70
  rvm_hooks_path="${rvm_hooks_path:-"$rvm_path/hooks"}"
71
71
  rvm_tmp_path="${rvm_tmp_path:-"$rvm_path/tmp"}"
72
- rvm_symlink_path="${rvm_symlink_path:-/usr/local/bin}"
72
+ rvm_symlink_path="${rvm_symlink_path:-$rvm_prefix/bin}"
73
73
 
74
74
  mkdir -p $rvm_archives_path $rvm_src_path $rvm_log_path $rvm_bin_path $rvm_gems_path $rvm_rubies_path $rvm_config_path $rvm_hooks_path $rvm_tmp_path $rvm_symlink_path $HOME/.gem/cache
75
75
 
@@ -92,6 +92,11 @@ if [[ ! -s "$rvm_config_path/user" ]] ; then
92
92
  echo '# Users settings file, overrides db file settings and persists across installs.' >> $rvm_config_path/user
93
93
  fi
94
94
 
95
+ scripts="monitor match log install color db fetch log set libraries"
96
+ for script_name in $(echo $scripts) ; do
97
+ chmod +x $rvm_scripts_path/$script_name
98
+ done
99
+
95
100
  #
96
101
  # Bin Scripts
97
102
  #
@@ -167,6 +172,7 @@ echo -e "\nThank you for using rvm. I hope that it makes your work easier and mo
167
172
  echo -e "If you have any questions, issues and/or ideas for improvement please hop in #rvm on irc.freenode.net and let me know."
168
173
  echo -e "My irc nickname is 'wayneeseguin' and I hang out from ~09:00-17:00EST and again from ~21:00EST-~00:00EST."
169
174
  echo -e "If I do not respond right away, please hang around after asking your question, I will respond as soon as I am back."
175
+ echo -e "Be sure to get head often as rvm development happens fast, you can do this by typing 'rvm update --head'."
170
176
  echo -e "\n w$(tput setaf 2)⦿‿⦿$(tput sgr0)t!"
171
177
  echo -e "\n ~ Wayne"
172
178
  echo -e "\n********************************************************************************"
@@ -176,13 +182,14 @@ if [[ "root" != "$(whoami)" ]] ; then
176
182
  echo -e "\n1) Place the folowing line at the end of your shell's loading files(.bashrc and then .bash_profile for bash and .zshrc for zsh), after all path/variable settings:"
177
183
  echo -e "\n if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi"
178
184
  echo -e "\n2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be prevented from working properly)."
179
- echo -e "\n This means that if you see '[ -z "$PS1" ] && return' then you must split your .bashrc"
185
+ echo -e "\n This means that if you see '[ -z "$PS1" ] && return' then you must remove it and split your .bashrc"
180
186
  echo -e "\n Put everything *except the return code line(s)* into your .bash_profile, and everything above that code in your .bashrc."
187
+ echo -e "\n Be *sure* to REMOVE the '&& return' statement line."
181
188
  echo -e "\n If you wish to DRY up your config you can 'source ~/.bashrc' at the top of your .bash_profile."
182
189
  echo -e "\n4) Then $(tput setaf 1)CLOSE THIS SHELL$(tput sgr0) and open a new one in order to use rvm.\n"
183
190
  fi
184
191
 
185
- if grep '&& return' ~/.bashrc ; then
192
+ if [[ -s $HOME/.bashrc ]] && grep '&& return' $HOME/.bashrc ; then
186
193
  echo -e "\n\nWARNING: you have a 'return' statement in your .bashrc, likely this will cause untold havoc. Please remove it and refactor your profiles to be correct. If you have questions about this please visit #rvm on irc.freenode.net.\n\n"
187
194
  fi
188
195
 
@@ -6,7 +6,6 @@ original_ruby_string=$rvm_ruby_string
6
6
  source $rvm_scripts_path/initialize
7
7
  source $rvm_scripts_path/utility
8
8
  source $rvm_scripts_path/selector
9
- source $rvm_scripts_path/libraries
10
9
 
11
10
  trap "rm -f $rvm_tmp_path/$$* > /dev/null 2>&1 ; exit" 0 1 2 3 15
12
11
 
@@ -113,7 +112,9 @@ __rvm_install_ruby() {
113
112
  macruby)
114
113
  if [[ "Darwin" = "$(uname)" ]] ; then
115
114
  if [[ "$rvm_head_flag" = 1 ]] ; then
116
- if [[ ! -z "$rvm_llvm_flag" ]] ; then __rvm_install_llvm ; fi
115
+ if [[ ! -z "$rvm_llvm_flag" ]] ; then
116
+ $rvm_scripts_path/package llvm install
117
+ fi
117
118
  macruby_path="/usr/local/bin"
118
119
  # TODO: configure & make variables should be set here.
119
120
  rvm_ruby_configure=" true "
@@ -370,7 +371,11 @@ RubyWrapper
370
371
  if [[ ! -z "$rvm_head_flag" ]] ; then __rvm_run "ant.dist" "ant dist" "Running 'ant dist' (this could take a few minutes) ..." ; fi
371
372
 
372
373
  mkdir -p "$rvm_ruby_home/bin/"
373
- __rvm_run "nailgun" "builtin cd \"$rvm_ruby_src_path/tool/nailgun\" && ./configure --prefix=$rvm_ruby_home && make $rvm_make_flags" "Building Nailgun"
374
+ if $rvm_scripts_path/match "$rvm_ruby_version" "1\.3" || $rvm_scripts_path/match "$rvm_ruby_version" "1\.2" ; then
375
+ __rvm_run "nailgun" "builtin cd \"$rvm_ruby_src_path/tool/nailgun\" && make $rvm_make_flags" "Building Nailgun"
376
+ else
377
+ __rvm_run "nailgun" "builtin cd \"$rvm_ruby_src_path/tool/nailgun\" && ./configure --prefix=$rvm_ruby_home && make $rvm_make_flags" "Building Nailgun"
378
+ fi
374
379
 
375
380
  __rvm_pushpop
376
381
 
@@ -860,7 +865,6 @@ __rvm_rubygems_setup() {
860
865
  install=1
861
866
  fi
862
867
 
863
-
864
868
  if [[ "$install" -eq 0 ]] ; then
865
869
  # 1.9.X has it's own built-in gem command
866
870
  __rvm_inject_ruby_shebang "$rvm_ruby_src_path/bin/gem"
@@ -967,7 +971,7 @@ __rvm_actual_file() {
967
971
  __rvm_manage_rubies() {
968
972
  rubies=() ; successes=() ; errors=() ; statuses=()
969
973
 
970
- unset rvm_gem_set_name rvm_ruby_selected_flag
974
+ unset rvm_gemset_name rvm_ruby_selected_flag
971
975
 
972
976
  rvm_ruby_gem_home=$(echo $rvm_ruby_gem_home | awk -F'%' '{print $1}')
973
977
  rvm_ruby_string=$(echo $rvm_ruby_string | awk -F'%' '{print $1}')
@@ -1010,3 +1014,4 @@ __rvm_manage_rubies() {
1010
1014
  rvm_action="$1" ; rubies_string="$2"
1011
1015
  __rvm_manage_rubies
1012
1016
  exit $?
1017
+
@@ -1,9 +1,18 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  #
4
- # ruby supporting libraries:
4
+ # ruby dependency packages:
5
5
  #
6
- __rvm_install_package() {
6
+
7
+ source $rvm_scripts_path/initialize
8
+ source $rvm_scripts_path/utility
9
+
10
+ trap "rm -f $rvm_tmp_path/$$* > /dev/null 2>&1 ; exit" 0 1 2 3 15
11
+ if [[ ! -z "$rvm_trace_flag" ]] ; then set -x ; export rvm_trace_flag ; fi
12
+
13
+ action="$1" ; shift ; library="$1" ; shift ; args="$*"
14
+
15
+ install_package() {
7
16
 
8
17
  if [[ ! -z "$rvm_make_flags_flag" ]] ; then __rvm_make_flags ; fi
9
18
 
@@ -41,28 +50,28 @@ __rvm_install_package() {
41
50
 
42
51
  }
43
52
 
44
- __rvm_readline_install() {
53
+ readline() {
45
54
  package="readline" ; archive_format="tar.gz"
46
55
  package_url="ftp://ftp.gnu.org/gnu/readline"
47
56
  for version in 5.2 6.0 ; do
48
57
  configure_flags="--disable-dependency-tracking --disable-static --enable-shared"
49
- __rvm_install_package
58
+ install_package
50
59
  done
51
60
  }
52
61
 
53
- __rvm_iconv_install() {
62
+ iconv() {
54
63
  package="libiconv" ; version=1.13.1 ; archive_format="tar.gz"
55
64
  package_url="http://ftp.gnu.org/pub/gnu/libiconv"
56
- __rvm_install_package
65
+ install_package
57
66
  }
58
67
 
59
- __rvm_curl_install() {
68
+ curl() {
60
69
  package="curl" ; version=7.19.7 ; archive_format="tar.gz"
61
70
  package_url="http://curl.haxx.se/download"
62
- __rvm_install_package
71
+ install_package
63
72
  }
64
73
 
65
- __rvm_openssl_install() {
74
+ openssl() {
66
75
  if $rvm_scripts_path/match "$rvm_archflags" "x86_64" ; then
67
76
  export openssl_os="os/compiler darwin64-x86_64-cc"
68
77
  else
@@ -71,52 +80,55 @@ __rvm_openssl_install() {
71
80
  package="openssl" ; version="0.9.8k" ; archive_format="tar.gz"
72
81
  package_url="http://www.openssl.org/source"
73
82
  configure="./config --prefix=$rvm_usr_path zlib no-asm no-krb5 shared"
74
- __rvm_install_package
83
+ install_package
75
84
  }
76
85
 
77
- __rvm_zlib_install() {
86
+ zlib() {
78
87
  package="zlib" ; version="1.2.3" ; archive_format="tar.gz"
79
88
  package_url="http://www.zlib.net"
80
- __rvm_install_package
89
+ install_package
81
90
  }
82
91
 
83
- __rvm_ncurses_install() {
92
+ ncurses() {
84
93
  package_url="ftp://invisible-island.net/ncurses/ncurses"
85
94
  package="ncurses" ; version="5.7" ; archive_format="tar.gz"
86
95
  configure_flags="--with-shared --disable-rpath --without-debug --without-ada --enable-safe-sprintf --enable-sigwinch --without-progs"
87
- __rvm_install_package
96
+ install_package
88
97
  }
89
98
 
90
- __rvm_pkgconfig_install() {
99
+ pkgconfig() {
91
100
  package_url="http://pkgconfig.freedesktop.org/releases"
92
101
  package="pkg-config" ; version="0.23" archive_format="tar.gz"
93
- __rvm_install_package
102
+ install_package
94
103
  }
95
104
 
96
- __rvm_gettext_install() {
105
+ gettext() {
97
106
  package_url="ftp://ftp.gnu.org/pub/gnu/gettext"
98
107
  package="gettext" ; version="0.17" ; archive_format="tar.gz"
99
- __rvm_install_package
108
+ install_package
100
109
  }
101
110
 
102
- __rvm_glib_install() {
111
+ glib() {
103
112
  package="glib" ; version="2.23.1" ; archive_format="tar.gz"
104
113
  package_url="http://ftp.gnome.org/pub/gnome/sources/glib/2.23"
105
114
  configure="CC=\"cc -L$rvm_usr_path/lib\" ./configure --prefix=$rvm_usr_path"
106
115
 
107
- __rvm_install_package
116
+ install_package
108
117
  }
109
118
 
110
- __rvm_mono_install() {
119
+ mono() {
120
+ gettext
121
+ pkgconfig
122
+ glib
123
+
124
+ __rvm_mono_env
111
125
  package="mono" ; version="2.6.1" ; archive_format="tar.bz2"
112
126
  packge_url="http://ftp.novell.com/pub/mono/sources/mono/"
113
- __rvm_mono_env
114
- __rvm_gettext_install
115
- __rvm_pkgconfig_install
116
- __rvm_glib_install
127
+
128
+ install_package
117
129
  }
118
130
 
119
- __rvm_llvm_install() {
131
+ llvm() {
120
132
  if [[ ! -z "$rvm_make_flags_flag" ]] ; then __rvm_make_flags ; fi
121
133
  __rvm_pushpop $rvm_src_path
122
134
  if [[ ! -d "$rvm_src_path/llvm/.svn" ]] ; then
@@ -129,3 +141,13 @@ __rvm_llvm_install() {
129
141
  fi
130
142
  __rvm_pushpop
131
143
  }
144
+
145
+ if [[ ! -z "$library" ]] && is_a_function ${library} ; then
146
+ ${library}
147
+ else
148
+ if [[ ! -z "$library" ]] ; then
149
+ $rvm_scripts_path/log "error" "Package '${library}' is unknown."
150
+ fi
151
+ $rvm_scripts_path/log "info" "Usage: 'rvm package {install,uninstall} {openssl,zlib,readline,iconv,ncurses}'"
152
+ exit 1
153
+ fi