-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake
46 lines (29 loc) · 1017 Bytes
/
make
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
#!/usr/bin/env bash
Option=$1
function Install () {
Login=$( head $HOME/login )
echo "$Login" | sudo -S apt-get install ruby
echo "$Login" | sudo -S apt-get install jekyll
echo "$Login" | sudo -S apt-get install bundler
echo "$Login" | sudo -S gem install jekyll bundler
echo "$Login" | sudo -S gem install update
echo "$Login" | sudo -S bundle install
echo "$Login" | sudo -S bundler install
}
function Serve () {
Host=$( hostname -I | awk '{print $1}' )
Port="8000"
Login=$( head $HOME/login )
echo "$Login" | sudo -S bundle exec jekyll serve -l -o -H [ --host $Host --port $Port ]
}
function Build () {
Login=$( head $HOME/login )
echo "$Login" | sudo -S bundle exec jekyll build --trace --incremental JEKYLL_ENV=development -w -d /var/www/circuitalminds
}
if [ $Option == "serve" ]; then
(Serve)
elif [ $Option == "build" ]; then
(Build)
elif [ $Option == "install" ]; then
(Install)
fi;