Skip to content

Commit

Permalink
Added a simple bootstrap script to the documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
wayneeseguin committed Nov 30, 2009
1 parent a119bb4 commit e844a34
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
5 changes: 4 additions & 1 deletion scripts/utility
Expand Up @@ -401,12 +401,15 @@ __rvm_update() {
if [[ ! -z "$rvm_bin_flag" ]] ; then __rvm_bin_scripts ; fi
if [[ ! -z "$rvm_rubygems_flag" ]] ; then __rvm_rubygems_setup ; fi
__rvm_hook "after_update"
rvm_reload_flag=1
}

__rvm_update_rvm() {
mkdir -p "$rvm_src_path"
__rvm_pushpop "$rvm_src_path"
if [[ "head" = "$rvm_ruby_revision" ]] ; then

system_ruby="$(rvm system ; which ruby 2>/dev/null)"
if [[ "head" = "$rvm_ruby_revision" ]] || [[ -z "$system_ruby" ]] ; then
if [[ -d "$rvm_src_path/rvm/.git" ]] ; then
builtin cd $rvm_src_path/rvm/ && git pull origin master && ./scripts/install
else
Expand Down
21 changes: 21 additions & 0 deletions site/content/install.html.haml
Expand Up @@ -71,3 +71,24 @@
:preserve
∴ optflags="-O0 -ggdb" rvm install 1.9.1

%h1 Bootstrap script
%p
The following script will boostrap git + rvm assuming that you have curl & sudo installed.
It will also install (last line) several common rubies.

%pre.code
:preserve
#!/usr/bin/env bash

# Install git
mkdir -p ~/.rvm/src && cd ~/.rvm/src && package = git && version=1.6.5.3
curl -O http://kernel.org/pub/software/scm/git/$package-$version.tar.gz
cd $package-$version && ./configure --prefix=/usr/local && make && sudo make install

# Install rvm
cd ~/.rvm/src && git clone git://github.com/wayneeseguin/rvm.git && cd rvm && ./install

# Install standard rubies
source ~/.rvm/scripts/rvm
rvm install 1.8.6,1.8.7,ree,1.9.1,jruby

8 changes: 7 additions & 1 deletion site/output/install/index.html
Expand Up @@ -252,7 +252,13 @@ <h1>Compile Flags</h1>
If you need to pass compile flags for the compile process you can simply set the corresponding environment variables.
For example with ruby 1.9.1 to enable gdb:
</p>
<pre class='code'>∴ optflags="-O0 -ggdb" rvm install 1.9.1</pre>
<pre class='code'>∴ optflags="-O0 -ggdb" rvm install 1.9.1&#x000A;</pre>
<h1>Bootstrap script</h1>
<p>
The following script will boostrap git + rvm assuming that you have curl & sudo installed.
It will also install (last line) several common rubies.
</p>
<pre class='code'>#!/usr/bin/env bash&#x000A;&#x000A;# Install git&#x000A;mkdir -p ~/.rvm/src && cd ~/.rvm/src && package = git && version=1.6.5.3&#x000A;curl -O http://kernel.org/pub/software/scm/git/$package-$version.tar.gz&#x000A;cd $package-$version && ./configure --prefix=/usr/local && make && sudo make install&#x000A;&#x000A;# Install rvm&#x000A;cd ~/.rvm/src && git clone git://github.com/wayneeseguin/rvm.git && cd rvm && ./install&#x000A;&#x000A;# Install standard rubies&#x000A;source ~/.rvm/scripts/rvm&#x000A;rvm install 1.8.6,1.8.7,ree,1.9.1,jruby</pre>
<a name='bottom'></a>
</div>
<div class='span-5 prepend-1 rightlast' id='sidebar'>
Expand Down

0 comments on commit e844a34

Please sign in to comment.