Author: assaf
Date: Sat Feb 16 17:37:07 2008
New Revision: 628405

URL: http://svn.apache.org/viewvc?rev=628405&view=rev
Log:
We haz install scriptz

Added:
    incubator/buildr/trunk/doc/scripts/
    incubator/buildr/trunk/doc/scripts/install-linux.sh   (with props)
    incubator/buildr/trunk/doc/scripts/install-osx.sh   (with props)
Modified:
    incubator/buildr/trunk/doc/pages/building.textile
    incubator/buildr/trunk/doc/pages/download.textile

Modified: incubator/buildr/trunk/doc/pages/building.textile
URL: 
http://svn.apache.org/viewvc/incubator/buildr/trunk/doc/pages/building.textile?rev=628405&r1=628404&r2=628405&view=diff
==============================================================================
--- incubator/buildr/trunk/doc/pages/building.textile (original)
+++ incubator/buildr/trunk/doc/pages/building.textile Sat Feb 16 17:37:07 2008
@@ -301,8 +301,7 @@
 verbose mode. |
 | @debug@             | Generates bytecode with debugging information.  Set
 from the debug environment variable/global option. |
-| @deprecation@       | If true, shows deprecation messages.  False by default.
-|
+| @deprecation@       | If true, shows deprecation messages.  False by 
default. |
 | @optimise@          | Generates faster bytecode by applying optimisations to
 the program. |
 | @source@            | Source code compatibility. |

Modified: incubator/buildr/trunk/doc/pages/download.textile
URL: 
http://svn.apache.org/viewvc/incubator/buildr/trunk/doc/pages/download.textile?rev=628405&r1=628404&r2=628405&view=diff
==============================================================================
--- incubator/buildr/trunk/doc/pages/download.textile (original)
+++ incubator/buildr/trunk/doc/pages/download.textile Sat Feb 16 17:37:07 2008
@@ -18,7 +18,7 @@
 On Ubuntu you can setup your environment by installing the following packages:
 
 {{{!sh
-$ sudo apt-get install ruby
+$ sudo apt-get install ruby-full
 $ sudo apt-get install ruby1.8-dev
 $ sudo apt-get install build-essential
 $ sudo apt-get install libopenssl-ruby
@@ -39,11 +39,6 @@
 $ sudo env JAVA_HOME=$JAVA_HOME gem install buildr
 }}}
 
-Buildr uses several libraries that include native extensions.  During
-installation it will ask you to pick a platform for these libraries.  By
-selecting @ruby@ it will download the source code for these extensions and
-compile them to work on your machine.
-
 To upgrade to a new version of Buildr:
 
 {{{!sh
@@ -56,13 +51,18 @@
 $ sudo env JAVA_HOME=$JAVA_HOME gem install buildr -v 1.3.0
 }}}
 
+You can also use this script "to install Buildr on
+Linux":scripts/install-linux.sh.  The script will either install or upgrade
+Buildr to the latest version.  It will also upgrade RubyGems to version 1.0.1
+or later, and if necessary install Ruby 1.8.6 using yum (RPM) or apt-get (deb).
+
 
 h2.  OS/X
 
-Leopard comes with the latest version of Ruby 1.8 and Ruby Gems.  If you are
-using Tiger or an older release of OS/X, we recommend you first install a
-recent version of Ruby and Ruby Gems (see "Building Ruby on
-OS/X":http://hivelogic.com/narrative/articles/ruby-rails-mongrel-mysql-osx)
+OS/X 10.5 (Leopard) comes with the latest version of Ruby 1.8.  If you are
+using an older version of OS/X, you will first need to upgrade to a recent
+version of Ruby.  You can install Ruby using MacPorts or Fink, or use the
+"One-Click Installer":http://rubyosx.rubyforge.org/.
 
 We recommend you first upgrade to the latest version of Ruby gems:
 
@@ -71,34 +71,34 @@
 }}}
 
 Before installing Buildr, please set the @JAVA_HOME@ environment variable to
-point to your JDK distribution, typically with:
+point to your JDK distribution:
 
 {{{!sh
-$ export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
+$ export JAVA_HOME=/Library/Java/Home
 }}}
 
 To install Buildr:
 
 {{{!sh
-$ sudo gem install buildr
+$ sudo env JAVA_HOME=$JAVA_HOME gem install buildr
 }}}
 
-Buildr uses several libraries that include native extensions.  During
-installation it will ask you to pick a platform for these libraries.  By
-selecting @ruby@ it will download the source code for these extensions and
-compile them to work on your machine.
-
 To upgrade to a new version of Buildr:
 
 {{{!sh
-$ sudo gem update buildr
+$ sudo env JAVA_HOME=$JAVA_HOME gem update buildr
 }}}
 
 To install a specific version of Buildr:
 
 {{{!sh
-$ sudo gem install buildr -v 1.3.0
+$ sudo env JAVA_HOME=$JAVA_HOME gem install buildr -v 1.3.0
 }}}
+
+You can also use this script "to install Buildr on
+OS/X":scripts/install-osx.sh.  The script will either install or upgrade Buildr
+to the latest version.  It will also upgrade RubyGems to version 1.0.1 or
+later, and if necessary install Ruby 1.8.6 using MacPorts or Fink.
 
 
 h2. Windows

Added: incubator/buildr/trunk/doc/scripts/install-linux.sh
URL: 
http://svn.apache.org/viewvc/incubator/buildr/trunk/doc/scripts/install-linux.sh?rev=628405&view=auto
==============================================================================
--- incubator/buildr/trunk/doc/scripts/install-linux.sh (added)
+++ incubator/buildr/trunk/doc/scripts/install-linux.sh Sat Feb 16 17:37:07 2008
@@ -0,0 +1,49 @@
+#!/bin/sh
+if [ -z `which ruby` ] ; then
+  echo "You do not have Ruby 1.8.6 ..."
+  if [ `which yum` ] ; then
+    echo "Installing Ruby using yum"
+    sudo yum install ruby rubygems 
+  elif [ `which apt-get` ] ; then
+    echo "Installing Ruby using apt-get"
+    # ruby package does not contain RDoc, IRB, etc; ruby-full is a 
meta-package.
+    # build-essentials not installed by default in Ubuntu, required for C 
extensions.
+    sudo apt-get install ruby-full ruby1.8-dev build-essential libopenssl-ruby
+    # RubyGems broken on Ubunutu, installing directly from source.
+    echo "Installing RubyGems from RubyForge"
+    curl -OL http://rubyforge.org/frs/download.php/29548/rubygems-1.0.1.tgz
+    tar xzf rubygems-1.0.1.tgz
+    cd rubygems-1.0.1
+    sudo ruby setup.rb
+    cd ..
+    rm -rf rubygems-1.0.1
+    # ruby is same as ruby1.8, we need gem that is same as gem1.8
+    sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
+  else
+    echo "Can only install Ruby 1.8.6 using either yum or apt-get, and can't 
find either one"
+    exit 1
+  fi
+  echo
+fi
+
+if [ -z $JAVA_HOME ] ; then
+  echo "Please set JAVA_HOME before proceeding"
+  exit 1
+fi
+
+if [ $(gem --version) \< '1.0.1' ] ; then
+  echo "Upgrading to RubyGems 1.0.1"
+  sudo gem update --system
+  echo
+fi
+
+if [ `which buildr` ] ; then
+  echo "Updating to the latest version of Buildr"
+  sudo env JAVA_HOME=$JAVA_HOME gem update buildr
+else
+  echo "Installing the latest version of Buildr"
+  sudo env JAVA_HOME=$JAVA_HOME gem install buildr
+fi
+echo
+
+buildr --version

Propchange: incubator/buildr/trunk/doc/scripts/install-linux.sh
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/buildr/trunk/doc/scripts/install-osx.sh
URL: 
http://svn.apache.org/viewvc/incubator/buildr/trunk/doc/scripts/install-osx.sh?rev=628405&view=auto
==============================================================================
--- incubator/buildr/trunk/doc/scripts/install-osx.sh (added)
+++ incubator/buildr/trunk/doc/scripts/install-osx.sh Sat Feb 16 17:37:07 2008
@@ -0,0 +1,38 @@
+#!/bin/sh
+version=$(ruby --version)
+if [ ${version:5:5} \< '1.8.6' ] ; then
+  echo "You do not have Ruby 1.8.6 or later, attempting to install a newer 
version."
+  if [ `which port` ] ; then
+    echo "Installing Ruby using MacPorts"
+    sudo port install ruby rb-rubygems
+  elif [ `which fink` ] ; then
+    echo "Installing Ruby using Fink"
+    sudo fink install ruby ruby18-dev rubygems-rb18
+  else
+    echo "Can only upgrade to Ruby 1.8.6 using either MacPorts or Fink, and 
can't find either one"
+    exit 1
+  fi
+  echo
+fi
+
+if [ -z $JAVA_HOME ] ; then
+  echo "Setting JAVA_HOME"
+  export JAVA_HOME=/Library/Java/Home
+fi
+
+if [ $(gem --version) \< '1.0.1' ] ; then
+  echo "Upgrading to RubyGems 1.0.1"
+  sudo gem update --system
+  echo
+fi
+
+if [ `which buildr` ] ; then
+  echo "Updating to the latest version of Buildr"
+  sudo env JAVA_HOME=$JAVA_HOME gem update buildr
+else
+  echo "Installing the latest version of Buildr"
+  sudo env JAVA_HOME=$JAVA_HOME gem install buildr
+fi
+echo
+
+buildr --version

Propchange: incubator/buildr/trunk/doc/scripts/install-osx.sh
------------------------------------------------------------------------------
    svn:executable = *


Reply via email to