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

54 lines
1.2 KiB
Plaintext
Raw Permalink Normal View History

#!/bin/bash
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
rm -Rf yaml-0.1.4*
curl -O http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
tar zxvf yaml-0.1.4.tar.gz
mv yaml-0.1.4 yaml-0.1.4-base
cd yaml-0.1.4-base
./configure --prefix=${opt_dir}
make
make install
cd ..
RUBY=ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.9.3-p194.tar.bz2
RUBY_FILENAME=${RUBY##*/}
RUBY_VERSION=${RUBY_FILENAME%%.tar.bz2}
curl $RUBY > $RUBY_FILENAME
rm -Rf $RUBY_VERSION
tar jxvf $RUBY_FILENAME
mv $RUBY_VERSION "$RUBY_VERSION-base"
cd "$RUBY_VERSION-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
cd /tmp/puppet
./apply