-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.compile
executable file
·46 lines (36 loc) · 1.34 KB
/
.compile
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
#!/bin/bash
#
# You need to first install jekyll to run the VHV documentation website locally.
# See the webpage:
# https://jekyllrb.com/docs/installation
# https://help.github.com/articles/setting-up-your-github-pages-site-locally-with-jekyll
# for instructions on installing it.
#
# This script to run the web server for VHV documenation uses external
# resource (javascript and css files). Use .serve-local to not depend
# on any external resources (such as when your computer is not connected
# to the internet).
#
# To run from the comand line, type:
# ./.serve
#
# Then look for the address of the webserver, which should be:
# http://127.0.0.1:3000
#
# Clear out old compiled website:
rm -rf _site
echo "Compiling website"
# Generate new website files:
bundle exec jekyll build
echo "Done compiling website"
# Link to non-repo files:
(cd _site && rm -f ./resources && ln -s /projects/polyrhythm-resources resources)
echo "Updating premissions"
# Allow access through SELinux:
chcon -R -t httpd_sys_content_t _site
sudo chcon -t httpd_sys_content_t /var/www/websites/polyrhythm
sudo chcon -R -t httpd_sys_content_t --user system_u /var/www/websites/polyrhythm
sudo chcon -R -t httpd_sys_content_t /projects/polyrhythm-resources
sudo restorecon _site
sudo restorecon /var/www/websites/polyrhythm
sudo restorecon /projects/polyrhythm-resources