Refreshing 1.9 build

Hi,

Is there a simpler way to refresh my Ruby 1.9 build?
Here’s what I’m currently using on my OS X box:

#!/bin/sh

To refresh Ruby 1.9 build after an initial

svn co http://svn.ruby-lang.org/repos/ruby/trunk ruby

svn up

VERSION=grep 'RUBY_VERSION ' version.h | awk '{print $3}' | sed -e's/"//g'
SUFFIX=grep RUBY_RELEASE_CODE version.h | awk '{print $3}'

echo “Building ${VERSION}-${SUFFIX}”
&& mkdir ${VERSION}-${SUFFIX}
&& cd ${VERSION}-${SUFFIX}
&& …/configure --prefix=/usr/local --program-suffix=19
&& make
&& sudo make install

Later,

Hi,

At Tue, 4 Sep 2007 23:20:08 +0900,
Bil K. wrote in [ruby-talk:267535]:

echo “Building ${VERSION}-${SUFFIX}”
&& mkdir ${VERSION}-${SUFFIX} \

You can use set -e.

Nobuyoshi N. wrote:

Setting -e option in a shell script causes the shell to exit
immediately if a command exits with a non-zero status.

Ah, yes.

Thank you,

Nobuyoshi N. wrote:

Hi,

Hi.

Bil K. wrote in [ruby-talk:267535]:

echo “Building ${VERSION}-${SUFFIX}”
&& mkdir ${VERSION}-${SUFFIX} \

You can use set -e.

I’m a bit slow… can you explain further how
I might use ‘set -e’?

Thanks,

Hi,

At Wed, 5 Sep 2007 00:40:04 +0900,
Bil K. wrote in [ruby-talk:267545]:

I’m a bit slow… can you explain further how
I might use ‘set -e’?

Setting -e option in a shell script causes the shell to exit
immediately if a command exits with a non-zero status.

So you can write many commands without && and \s.

set -e
echo “Building ${VERSION}-${SUFFIX}”
mkdir ${VERSION}-${SUFFIX}
cd ${VERSION}-${SUFFIX}
…/configure --prefix=/usr/local --program-suffix=19
make
sudo make install

A difference is that it exits with a non-zero status by -e.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs