forked from mikoto20000/railsgun
-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathgems
More file actions
76 lines (68 loc) · 1.69 KB
/
Copy pathgems
File metadata and controls
76 lines (68 loc) · 1.69 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
#!/bin/bash
# rubygems.lstからgemのリストを取得しインストール
# インストールするディレクトリ名
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]}
case $OS in
rhel6|debian)
if [ "$VER" = "-" ]
then
gem install $NAME --no-rdoc --no-ri
else
gem install $NAME -v=$VER --no-rdoc --no-ri
fi
;;
mac)
if [ "$VER" = "-" ]
then
sudo gem install $NAME --no-rdoc --no-ri
else
sudo gem install $NAME -v=$VER --no-rdoc --no-ri
fi
;;
esac
done
## install mod_passenger
case $OS in
rhel6)
if [ ! -f /usr/lib/ruby/gems/1.8/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 /Library/Ruby/Gems/1.8/gems/passenger-3.*/ext/apache2/mod_passenger.so ]
then
sudo gem install passenger --no-rdoc --no-ri
sudo passenger-install-apache2-module --auto
fi
;;
esac
pushd .
cd cache
if [ ! -f redcarpet ]
then
git clone https://github.com/alminium/redcarpet.git
cd redcarpet
if [ "$OS" = "rhel6" ]
then
rake install
else
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
/var/lib/gems/1.8/gems/rake-0.9.2.2/bin/rake install
else
gem install rake-compiler --no-rdoc --no-ri
rake install
fi
fi
fi
popd