-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathinstall.sh
executable file
·47 lines (34 loc) · 937 Bytes
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/sh
cd $OPENSHIFT_TMP_DIR
# get & compile yaml
wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
tar xzf yaml-0.1.4.tar.gz
cd yaml-0.1.4
./configure --prefix=$OPENSHIFT_RUNTIME_DIR
make
make install
# clean up yaml sources
cd $OPENSHIFT_TMP_DIR
rm -rf yaml*
# get ruby
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz
tar xzf ruby-1.9.3-p194.tar.gz
cd ruby-1.9.3-p194
# export directory with yaml.h
export C_INCLUDE_PATH=$OPENSHIFT_RUNTIME_DIR/include
# export directory with libyaml
export LIBYAMLPATH=$OPENSHIFT_RUNTIME_DIR/lib
cd ext/psych
sed -i '1i $LIBPATH << ENV["LIBYAMLPATH"]' extconf.rb
cd $OPENSHIFT_TMP_DIR
cd ruby-1.9.3-p194
# compile ruby
./configure --disable-install-doc --prefix=$OPENSHIFT_RUNTIME_DIR
make
make install
export PATH=$OPENSHIFT_RUNTIME_DIR/bin:$PATH
# clean up ruby sources
cd $OPENSHIFT_TMP_DIR
rm -rf ruby*
# install rails
gem install rails --no-ri --no-rdoc