-
Notifications
You must be signed in to change notification settings - Fork 14
/
install_jekyll.sh
executable file
·80 lines (67 loc) · 1.75 KB
/
install_jekyll.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
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
#!/bin/bash
#
# Bash script to install the jekyll.
# Author: luismartingil
# Year: 2015
#
# Centos friendly installation script
SOURCES_PATH=/usr/local/src/jekyll_installation
install_repo() {
curl -O http://linuxsoft.cern.ch/cern/scl/slc6-scl.repo
sudo mv slc6-scl.repo /etc/yum.repos.d/
sudo rpm --import http://ftp.mirrorservice.org/sites/ftp.scientificlinux.org/linux/scientific/51/i386/RPM-GPG-KEYs/RPM-GPG-KEY-cern
sudo yum clean all
}
install_reqs() {
sudo yum -y install devtoolset-3 gcc g++ gcc-c++
sudo yum -y install patch readline readline-devel zlib zlib-devel
sudo yum -y install libyaml-devel libffi-devel openssl-devel make bzip2
sudo yum -y install autoconf automake libtool bison
}
do_setup () {
sudo mkdir -p $SOURCES_PATH
sudo chown -R `whoami`:`whoami` $SOURCES_PATH
pushd $SOURCES_PATH
}
tear_down() {
popd
sudo yum -y remove devtoolset-3*
sudo rm -fr /etc/yum.repos.d/slc6-scl.repo
sudo yum clean all
sudo rm -fr $SOURCES_PATH
}
install_ruby() {
wget https://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.7.tar.gz
tar -xvf ruby-2.1.7.tar.gz
cd ruby-2.1.7/
./configure
make --jobs=4
sudo make install
}
install_rubygems () {
wget https://rubygems.org/rubygems/rubygems-2.4.8.tgz
tar -xvf rubygems-2.4.8.tgz
cd rubygems-2.4.8/
sudo -i ruby setup.rb
}
install_nodejs () {
wget https://nodejs.org/dist/v4.2.1/node-v4.2.1.tar.gz
tar -xvf node-v4.2.1.tar.gz
cd node-v4.2.1/
scl enable devtoolset-3 - <<EOF
./configure
make --jobs=8
sudo make install
EOF
}
install_jekyll () {
sudo /usr/local/bin/gem install jekyll
}
do_setup
install_repo
install_reqs
install_ruby
install_rubygems
install_nodejs
install_jekyll
tear_down