Repository navigation
Expand file tree
/
Copy pathgems
More file actions
executable file
·55 lines (48 loc) · 1.43 KB
/
Copy pathgems
File metadata and controls
executable file
·55 lines (48 loc) · 1.43 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
#!/bin/bash
# rubygems.lstからgemのリストを取得しインストール
GEM=`which gem2.0`
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 -f $NAME --no-rdoc --no-ri
else
$GEM install -f $NAME -v=$VER --no-rdoc --no-ri
fi
done
## install mod_passenger
case $OS in
rhel6)
if [ ! -f /usr/lib64/ruby/gems/2.1.0/gems/passenger-4.*/buildout/apache2/mod_passenger.so ]
then
$GEM install passenger --no-rdoc --no-ri
passenger-install-apache2-module --auto
fi
;;
mac)
if [ ! -f /opt/local/lib/ruby2.0/gems/2.0.0/gems/passenger-4.*/buildout/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/2.0.0/gems/passenger-4.0.*/buildout/apache2/mod_passenger.so ]
then
$GEM install thin
$GEM install passenger --no-rdoc --no-ri
passenger-install-apache2-module --auto
fi
;;
esac