rvm 1.1.4 → 1.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. data/lib/VERSION.yml +1 -1
  2. data/lib/rvm/environment.rb +1 -1
  3. data/lib/rvm/shell/shell_wrapper.sh +1 -1
  4. data/rvm.gemspec +3 -110
  5. metadata +4 -111
  6. data/binscripts/rvm +0 -76
  7. data/binscripts/rvm-auto-ruby +0 -24
  8. data/binscripts/rvm-prompt +0 -208
  9. data/binscripts/rvm-shell +0 -35
  10. data/binscripts/rvm-update-head +0 -58
  11. data/binscripts/rvm-update-latest +0 -27
  12. data/binscripts/rvmsudo +0 -20
  13. data/config/db +0 -71
  14. data/config/known +0 -54
  15. data/config/md5 +0 -139
  16. data/contrib/gemset_snapshot +0 -25
  17. data/contrib/install-system-wide +0 -221
  18. data/contrib/r +0 -44
  19. data/examples/rvmrc +0 -49
  20. data/gemsets/default.gems +0 -1
  21. data/gemsets/global.gems +0 -1
  22. data/help/alias +0 -46
  23. data/help/benchmark +0 -17
  24. data/help/cleanup +0 -23
  25. data/help/debug +0 -8
  26. data/help/disk-usage +0 -15
  27. data/help/docs +0 -22
  28. data/help/exec +0 -33
  29. data/help/fetch +0 -5
  30. data/help/gem +0 -0
  31. data/help/gemdir +0 -0
  32. data/help/gemset +0 -14
  33. data/help/implode +0 -0
  34. data/help/info +0 -62
  35. data/help/install +0 -0
  36. data/help/list +0 -0
  37. data/help/migrate +0 -15
  38. data/help/monitor +0 -0
  39. data/help/notes +0 -0
  40. data/help/package +0 -0
  41. data/help/rake +0 -14
  42. data/help/remove +0 -0
  43. data/help/repair +0 -23
  44. data/help/reset +0 -0
  45. data/help/ruby +0 -84
  46. data/help/rubygems +0 -11
  47. data/help/rvmrc +0 -34
  48. data/help/snapshot +0 -15
  49. data/help/specs +0 -0
  50. data/help/srcdir +0 -0
  51. data/help/tests +0 -0
  52. data/help/tools +0 -22
  53. data/help/uninstall +0 -0
  54. data/help/update +0 -0
  55. data/help/upgrade +0 -18
  56. data/help/use +0 -0
  57. data/help/wrapper +0 -41
  58. data/install +0 -667
  59. data/man/man1/rvm.1 +0 -380
  60. data/man/man1/rvm.1.gz +0 -0
  61. data/scripts/alias +0 -226
  62. data/scripts/aliases +0 -4
  63. data/scripts/array +0 -32
  64. data/scripts/base +0 -57
  65. data/scripts/cd +0 -94
  66. data/scripts/cleanup +0 -58
  67. data/scripts/cli +0 -798
  68. data/scripts/color +0 -49
  69. data/scripts/completion +0 -151
  70. data/scripts/db +0 -87
  71. data/scripts/default +0 -64
  72. data/scripts/disk-usage +0 -60
  73. data/scripts/docs +0 -115
  74. data/scripts/env +0 -46
  75. data/scripts/environment-convertor +0 -74
  76. data/scripts/fetch +0 -231
  77. data/scripts/gemsets +0 -1045
  78. data/scripts/get +0 -126
  79. data/scripts/hash +0 -37
  80. data/scripts/help +0 -46
  81. data/scripts/hook +0 -23
  82. data/scripts/info +0 -213
  83. data/scripts/initialize +0 -29
  84. data/scripts/install +0 -667
  85. data/scripts/irbrc +0 -13
  86. data/scripts/irbrc.rb +0 -64
  87. data/scripts/list +0 -315
  88. data/scripts/log +0 -38
  89. data/scripts/maglev +0 -193
  90. data/scripts/manage +0 -2157
  91. data/scripts/match +0 -6
  92. data/scripts/md5 +0 -22
  93. data/scripts/migrate +0 -175
  94. data/scripts/monitor +0 -105
  95. data/scripts/notes +0 -140
  96. data/scripts/override_gem +0 -14
  97. data/scripts/package +0 -302
  98. data/scripts/patches +0 -64
  99. data/scripts/patchsets +0 -87
  100. data/scripts/repair +0 -199
  101. data/scripts/rubygems +0 -157
  102. data/scripts/rvm +0 -128
  103. data/scripts/rvm-install +0 -667
  104. data/scripts/selector +0 -904
  105. data/scripts/set +0 -301
  106. data/scripts/snapshot +0 -262
  107. data/scripts/tools +0 -58
  108. data/scripts/update +0 -667
  109. data/scripts/upgrade +0 -144
  110. data/scripts/utility +0 -1499
  111. data/scripts/version +0 -17
  112. data/scripts/wrapper +0 -210
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- if [[ ${rvm_leave_gem_alone:-0} -eq 0 ]]; then
4
- gem()
5
- {
6
- local result
7
-
8
- command gem "$@" ; result="$?"
9
-
10
- hash -r
11
-
12
- return $result
13
- }
14
- fi
@@ -1,302 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- if [[ "$rvm_trace_flag" -eq 2 ]] ; then set -x ; export rvm_trace_flag ; fi
4
-
5
- rvm_base_except="selector"
6
- source "$rvm_path/scripts/base"
7
-
8
- install_package()
9
- {
10
- __rvm_db "${package}_url" "package_url"
11
-
12
- if [[ ! -z "$rvm_make_flags_flag" ]] ; then __rvm_make_flags ; fi
13
-
14
- (
15
- builtin cd "$src_path"
16
-
17
- "$rvm_path/scripts/log" "info" \
18
- "Fetching $package-$version.$archive_format to $archives_path"
19
-
20
- case "$archive_format" in
21
-
22
- tar.gz|tgz)
23
-
24
- "$rvm_path/scripts/fetch" \
25
- "$package_url/$package-$version.$archive_format" \
26
- || (result=$? && return $result)
27
-
28
- __rvm_run "$package/extract" \
29
- "tar zxf $archives_path/$package-$version.$archive_format -C $src_path" \
30
- "Extracting $package-$version.$archive_format to $src_path"
31
- ;;
32
-
33
- tar.bz2)
34
-
35
- "$rvm_path/scripts/fetch" \
36
- "$package_url/$package-$version.$archive_format" \
37
- || (result=$? && return $result)
38
-
39
- __rvm_run "$package/extract" \
40
- "tar jxf $archives_path/$package-$version.$archive_format -C $src_path" \
41
- "Extracting $package-$version.$archive_format to $src_path"
42
-
43
- ;;
44
-
45
- zip)
46
-
47
- "$rvm_path/scripts/fetch" \
48
- "$package_url/$package-$version.$archive_format" \
49
- || (result=$? && return $result)
50
-
51
- __rvm_run "$package/extract" \
52
- "unzip -q -o $archives_path/$package-$version.$archive_format -d $src_path/$package-$version" \
53
- "Extracting $package-$version.$archive_format to $src_path"
54
- ;;
55
-
56
- *)
57
- printf "\nUnrecognized archive format '$archive_format'" ; return 1
58
-
59
- esac
60
-
61
- builtin cd "$src_path/$package-$version"
62
-
63
- if [[ ! -z "$patches" ]] ; then
64
- for patch in $(echo $patches | tr ',' ' ') ; do
65
- __rvm_run "$package/patch" "patch -p0 -f < $patch" "Applying patch '$patch'..."
66
- if [[ $? -gt 0 ]] ; then
67
- $rvm_scripts_path/log "error" "Patch $patch did not apply cleanly... back to the patching board :(" ; exit 1
68
- fi
69
- done
70
- fi
71
-
72
- __rvm_run "$package/configure" \
73
- "${configure:-"./configure --prefix=\"${prefix_path:-"$usr_path"}\""} $configure_flags" \
74
- "Configuring $package in $src_path/$package-$version."
75
-
76
- unset configure_flags
77
-
78
- if [[ "$action" = "uninstall" ]] ; then
79
-
80
- __rvm_run "$package/make.uninstall" \
81
- "/usr/bin/make uninstall" \
82
- "Uninstalling $package from $usr_path"
83
-
84
- else
85
-
86
- __rvm_run "$package/make" \
87
- "/usr/bin/make $rvm_make_flags" \
88
- "Compiling $package in $src_path/$package-$version."
89
-
90
- __rvm_run "$package/make.install" \
91
- "/usr/bin/make install" \
92
- "Installing $package to $usr_path"
93
-
94
- fi
95
-
96
- touch "$rvm_path/config/packages"
97
- "$rvm_path/scripts/db" \
98
- "$rvm_path/config/packages" "${package}" "${version}"
99
- )
100
- result=$?
101
-
102
- return ${result:-0}
103
- }
104
-
105
- readline()
106
- {
107
- package="readline" ; archive_format="tar.gz"
108
- configure="env CFLAGS=-I${usr_path}/include LDFLAGS=-L${usr_path}/lib ./configure --prefix=${usr_path} --disable-dependency-tracking --disable-static --enable-shared"
109
-
110
- version="5.2"
111
- patches="$rvm_path/patches/$package-$version/shobj-conf.patch"
112
- install_package
113
-
114
- version="6.0"
115
- patches=""
116
- install_package
117
- }
118
-
119
- iconv()
120
- {
121
- package="libiconv" ; version=1.13.1 ; archive_format="tar.gz"
122
- install_package
123
- }
124
-
125
- curl()
126
- {
127
- package="curl" ; version=7.19.7 ; archive_format="tar.gz"
128
- install_package
129
- }
130
-
131
- openssl()
132
- {
133
- package="openssl" ; version="0.9.8n" ; archive_format="tar.gz"
134
- if [[ "Darwin" = "$(uname)" ]] ; then
135
-
136
- if [[ ! -z "$rvm_archflags" ]]; then
137
-
138
- if "$rvm_path/scripts/match" "$rvm_archflags" "64"; then
139
- hw_cpu64bit=1
140
- fi
141
-
142
- if "$rvm_path/scripts/match" "$rvm_archflags" "ppc"; then
143
- hw_machine="Power Macintosh"
144
- fi
145
- else
146
- hw_machine=$(sysctl hw.machine | awk -F: '{print $2}' | sed 's/^ //')
147
- hw_cpu64bit=$(sysctl hw.cpu64bit_capable | awk '{print $2}')
148
- fi
149
-
150
- if [[ "Power Macintosh" = "$hw_machine" ]] ; then
151
-
152
- if [[ $hw_cpu64bit = 1 ]]; then
153
- openssl_os="darwin64-ppc-cc"
154
- else
155
- openssl_os="darwin-ppc-cc"
156
- fi
157
-
158
- else
159
- if [[ $hw_cpu64bit = 1 ]]; then
160
- openssl_os="darwin64-x86_64-cc"
161
- else
162
- openssl_os="darwin-i386-cc"
163
- fi
164
- fi
165
- configure_command="./Configure"
166
-
167
- # Anyone know WTF happened to these patches???
168
- #patches="$rvm_path/patches/$package/Makefile.org.patch,$rvm_path/patches/$package/crypto-Makefile.patch"
169
-
170
- # Don't use -j option for make OpenSSL
171
- if [[ ! -z "$rvm_make_flags" ]] ; then
172
- rvm_make_flags=$(echo "$rvm_make_flags" | sed -e "s/-j[[:space:]]*[[0-9]]*//")
173
- fi
174
- else
175
- configure_command="./config"
176
- fi
177
- configure="$configure_command $openssl_os -I$usr_path/include -L$usr_path/lib --prefix=$usr_path zlib no-asm no-krb5 shared"
178
- install_package
179
- }
180
-
181
- zlib()
182
- {
183
- package="zlib" ; version="1.2.5" ; archive_format="tar.gz"
184
- install_package
185
- }
186
-
187
- autoconf()
188
- {
189
- package="autoconf" ; version="2.65" ; archive_format="tar.gz"
190
- prefix_path="$usr_path"
191
- install_package
192
- }
193
-
194
- ncurses()
195
- {
196
- package="ncurses" ; version="5.7" ; archive_format="tar.gz"
197
- configure_flags="--with-shared --disable-rpath --without-debug --without-ada --enable-safe-sprintf --enable-sigwinch --without-progs"
198
- install_package
199
- }
200
-
201
- pkgconfig()
202
- {
203
- package="pkg-config" ; version="0.23" archive_format="tar.gz"
204
- install_package
205
- }
206
-
207
- gettext()
208
- {
209
- package="gettext" ; version="0.17" ; archive_format="tar.gz"
210
- install_package
211
- }
212
-
213
- libxml2()
214
- {
215
- package="libxml2" ; version="2.7.3" ; archive_format="tar.gz"
216
- if [[ "Darwin" = "$(uname)" ]] ; then
217
- configure="./configure --prefix=$usr_path --build=i686-apple-darwin$(uname -r) --host=i686-apple-darwin$(uname -r)"
218
- fi
219
- install_package
220
- unset prefix_path
221
- }
222
-
223
- glib()
224
- {
225
- pkgconfig
226
- gettext
227
- package="glib" ; version="2.23.1" ; archive_format="tar.gz"
228
- configure="CC=\"cc -L$usr_path/lib -I$usr_path/include\" PKG_CONFIG=\"$usr_path/bin/pkg-config\" ./configure --prefix=\"$usr_path\""
229
-
230
- install_package
231
- }
232
-
233
- mono()
234
- {
235
- glib
236
-
237
- __rvm_mono_env
238
- package="mono" ; version="2.6.1" ; archive_format="tar.bz2"
239
- install_package
240
- }
241
-
242
- llvm()
243
- {
244
- package="llvm" ; version="89156"
245
- if [[ ! -z "$rvm_make_flags_flag" ]] ; then __rvm_make_flags ; fi
246
- (
247
- builtin cd $src_path
248
- if [[ ! -d "$src_path/llvm/.svn" ]] ; then
249
- __rvm_db "${package}_url" "package_url"
250
- \rm -rf "$src_path/llvm"
251
- svn co -r "$version" "$package_url" llvm
252
- builtin cd "$src_path/llvm"
253
- ./configure --enable-bindings=none
254
- UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" ENABLE_OPTIMIZED=1 make -j2
255
- sudo env UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" ENABLE_OPTIMIZED=1 make install
256
- fi
257
- )
258
- }
259
-
260
- reset()
261
- {
262
- unset package version archive_format patches prefix_path configure configure_flags
263
- }
264
-
265
- # Tools to make managing ruby dependencies inside of rvm easier.
266
- args=($*)
267
- action="${args[0]:-""}"
268
- library="${args[1]:-""}"
269
- args="$(echo ${args[@]:2})"
270
-
271
- archives_path="${rvm_archives_path:-"$rvm_path/archives"}"
272
- src_path="${rvm_src_path:-"$rvm_path/src"}"
273
- usr_path="${rvm_usr_path:-"$rvm_path/usr"}"
274
-
275
- if [[ -n "$library" ]] ; then
276
-
277
- case $library in
278
- readline|iconv|curl|openssl|zlib|autoconf|ncurses|pkgconfig|gettext|glib|mono|llvm|libxml2)
279
- ${library}
280
- ;;
281
- ree_dependencies)
282
- for i in zlib ncurses readline openssl iconv; do
283
- ${i}
284
- reset
285
- done
286
- ;;
287
- *)
288
- "$rvm_path/scripts/log" "error" "Package '${library}' is unknown."
289
- ;;
290
- esac
291
-
292
- exit $?
293
-
294
- else
295
- "$rvm_path/scripts/log" "info" \
296
- "Usage: 'rvm package {install,uninstall} {readline,iconv,curl,openssl,zlib,autoconf,ncurses,pkgconfig,gettext,glib,mono,llvm,libxml2}'"
297
- "$rvm_path/scripts/log" "info" \
298
- " 'ree_dependencies' installs zlib, ncurses, readline, openssl and iconv in this order."
299
- "$rvm_path/scripts/log" "info" \
300
- " still need to add ' --with-readline-dir=\$rvm_path/usr --with-iconv-dir=\$rvm_path/usr --with-zlib-dir=\$rvm_path/usr --with-openssl-dir=\$rvm_path/usr' to 'rvm install ree'"
301
- exit 1
302
- fi
@@ -1,64 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- # General tools for manipulating patches
4
- # and dealing with patches.
5
-
6
- # Returns the path used to look for a patch given a specific name.
7
- __rvm_patch_lookup_path()
8
- {
9
- echo "/"
10
-
11
- [[ -n "${rvm_patch_original_pwd:-""}" ]] && echo "$rvm_patch_original_pwd/"
12
-
13
- echo "$PWD/"
14
-
15
- __rvm_ruby_string_paths_under "$rvm_path/patches" | sed 's/$/\//'
16
-
17
- return $?
18
- }
19
-
20
- __rvm_expand_patch_name()
21
- {
22
- local name expanded_patch_name
23
-
24
- name="${1:-""}"
25
-
26
- [[ -z "$name" ]] && return 0
27
-
28
- expanded_patch_name="$("$rvm_path/scripts/patchsets" show "$name")"
29
-
30
- if [[ "$?" == "0" ]]; then
31
- echo "${expanded_patch_name}"
32
-
33
- elif [[ "$name" != "default" ]]; then
34
- echo "$name"
35
- fi
36
-
37
- return 0
38
- }
39
-
40
- # Return the full patch for a given patch.
41
- __rvm_lookup_full_patch_path()
42
- {
43
- local extension patch_path directory directories
44
-
45
- # Absolute path, pwd and then finally the rvm patches path.
46
- directories=($(__rvm_patch_lookup_path))
47
-
48
- for directory in "${directories[@]}" ; do
49
-
50
- for extension in {"",.patch,.diff}; do
51
-
52
- patch_path="${directory}${1}${extension}"
53
-
54
- if [[ -s "$patch_path" ]]; then
55
- echo "$patch_path"
56
- return 0
57
- fi
58
-
59
- done
60
-
61
- done
62
-
63
- return 0
64
- }
@@ -1,87 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- rvm_base_except="selector"
4
-
5
- source "$rvm_path/scripts/base"
6
-
7
- source "$rvm_path/scripts/patches"
8
-
9
- lookup_patchset()
10
- {
11
-
12
- local paths lookup_path
13
-
14
- if [[ -z "$1" ]]; then
15
- echo "Usage: rvm patchset show name"
16
- return 1
17
- fi
18
-
19
- paths=($(__rvm_ruby_string_paths_under "$rvm_path/patchsets"))
20
-
21
- for lookup_path in "${paths[@]}" ; do
22
-
23
- if [[ -s "$lookup_path/$1" ]]; then
24
-
25
- cat "$lookup_path/$1"
26
-
27
- return 0
28
- fi
29
- done
30
-
31
- return 1
32
- }
33
-
34
- # Return the full patch for a given patch.
35
- __rvm_lookup_full_patch_path()
36
- {
37
-
38
- local directory directories extension patch_path
39
-
40
- directories=($(__rvm_patch_lookup_path))
41
-
42
- # Absolute path, pwd and then finally the rvm patches path.
43
- for directory in "${directories[@]}" ; do
44
-
45
- for extension in {"",.patch,.diff}; do
46
-
47
- patch_path="${directory}${1}${extension}"
48
-
49
- if [[ -s "$patch_path" ]]; then
50
- echo "$patch_path"
51
- return
52
- fi
53
-
54
- done
55
-
56
- done
57
-
58
- return 1
59
- }
60
-
61
- usage()
62
- {
63
- printf "
64
-
65
- Usage:
66
-
67
- rvm patchset {show,lookup} [patchset]
68
-
69
- Description:
70
-
71
- Tools for manipulating patchsets.
72
-
73
- "
74
- return 1
75
- }
76
-
77
- args=($*)
78
- action="${args[0]}"
79
- patchset="${args[1]}"
80
- args="$(echo ${args[@]:2}) " # Strip trailing / leading / extra spacing.
81
-
82
- case "$action" in
83
- show|lookup) lookup_patchset "$patchset" ;;
84
- *) usage ;;
85
- esac
86
-
87
- exit $?