Repository navigation
Expand file tree
/
Copy pathgems
More file actions
94 lines (83 loc) · 2.25 KB
/
Copy pathgems
File metadata and controls
94 lines (83 loc) · 2.25 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/bin/bash
# rubygems.lstからgemのリストを取得しインストール
GEM=`which gem1.9.3`
if [ "$GEM" = "" ]
then
GEM=gem
fi
# インストールするディレクトリ名
NAME=(`grep -v "^#" config/rubygems.lst | awk -F, '{print $1}'`)
VER=(`grep -v "^#" config/rubygems.lst | awk -F, '{print $2}'`)
for (( i = 0; i < ${#NAME[@]}; ++i ))
do
NAME=${NAME[$i]}
VER=${VER[$i]}
if [ "$VER" = "-" ]
then
$GEM install $NAME --no-rdoc --no-ri
else
$GEM install $NAME -v=$VER --no-rdoc --no-ri
fi
done
## install mod_passenger
case $OS in
rhel6)
if [ ! -f /usr/lib64/ruby/gems/1.9.1/gems/passenger-3.*/ext/apache2/mod_passenger.so ]
then
$GEM install passenger --no-rdoc --no-ri
passenger-install-apache2-module --auto
fi
;;
mac)
if [ ! -f /opt/local/lib/ruby/gems/1.9.1/gems/passenger-3.*/ext/apache2/mod_passenger.so ]
then
$GEM install passenger --no-rdoc --no-ri
export APXS2=/opt/local/apache2/bin/apxs
export PATH=/opt/local/apache2/bin:$PATH
passenger-install-apache2-module --auto
fi
;;
debian)
if [ ! -f /var/lib/gems/1.9.1/gems/passenger-3.0.*/ext/apache2/mod_passenger.so ]
then
$GEM install thin
$GEM install passenger --no-rdoc --no-ri
passenger-install-apache2-module --auto
fi
;;
esac
pushd .
cd cache
if [ ! -f redcarpet ]
then
git clone https://github.com/alminium/redcarpet.git
cd redcarpet
case $OS in
rhel6)
$RAKE install
;;
mac)
$GEM install nokogiri --no-rdoc --no-ri \
-- --with-xml2-include=/opt/local/include/libxml2 \
--with-xml2-lib=/opt/local/lib --with-xslt-dir=/opt/local
$GEM install rake -v=0.9.2.2 --no-rdoc --no-ri
$GEM install rake-compiler --no-rdoc --no-ri
$RAKE install
;;
debian)
DEB_VER=`cat /etc/debian_version`
if [[ "$DEB_VER" =~ ^6\. ]]
then
$GEM install rake -v=0.9.2.2 --no-rdoc --no-ri
$GEM install rake-compiler --no-rdoc --no-ri
$RAKE install
else
$GEM install rake-compiler --no-rdoc --no-ri
$RAKE install
fi
;;
*)
;;
esac
fi
popd