puppet-standalone-mashup/skel/redhat/bootstrap.erb

53 lines
1.1 KiB
Plaintext
Raw Normal View History

#!/bin/bash
2012-07-09 20:50:04 +00:00
YAML_VERSION=0.1.4
RUBY_VERSION=1.9.3-p194
2012-01-18 17:29:05 +00:00
pwd=$PWD
base_dir=<%= base_dir %>
if [ ! -f ${base_dir}/ruby-base/bin/ruby ]; then
echo "Installing Ruby to ${base_dir}/ruby-base..."
mkdir -p ${base_dir}/tmp
cd ${base_dir}/tmp
2012-05-03 13:30:32 +00:00
opt_dir=${base_dir}/tmp/ruby-opt
2012-07-09 20:50:04 +00:00
rm -Rf yaml-$YAML_VERSION*
curl http://pyyaml.org/download/libyaml/yaml-$YAML_VERSION.tar.gz > yaml.tar.gz
2012-07-31 19:58:54 +00:00
tar zxvf yaml.tar.gz
2012-07-09 20:50:04 +00:00
mv yaml-$YAML_VERSION yaml-$YAML_VERSION-base
cd yaml-$YAML_VERSION-base
2012-05-03 13:30:32 +00:00
./configure --prefix=${opt_dir}
make
make install
cd ..
2012-07-09 20:50:04 +00:00
rm -Rf ruby-$RUBY_VERSION
curl ftp://ftp.ruby-lang.org/pub/ruby/ruby-$RUBY_VERSION.tar.bz2 > ruby.tar.bz2
tar jxvf ruby.tar.bz2
mv ruby-$RUBY_VERSION ruby-base
2012-07-09 20:50:04 +00:00
cd ruby-base
2012-05-03 13:30:32 +00:00
./configure --prefix=${base_dir}/ruby-base --with-opt-dir=${opt_dir} --disable-pthread --disable-install-doc
make
make install
2012-01-18 17:29:05 +00:00
cd ext/openssl
PATH=${base_dir}/ruby-base/bin:$PATH ruby extconf.rb
make
make install
fi
PATH=${base_dir}/ruby-base/bin:$PATH
if [ ! -f ${base_dir}/ruby-base/bin/puppet ]; then
echo "Installing Puppet..."
2012-05-03 13:30:32 +00:00
gem install puppet --no-ri --no-rdoc
fi
2012-01-18 17:29:05 +00:00
mkdir -p ~/.puppet
2012-07-31 19:58:54 +00:00