0
0
Förgrening 0

add makefile to build and install files

This adds a makefile to build and install the files. This can be used
for an easier deployment on the page.
This commit is contained in:
Gibheer 2015-11-17 20:48:58 +01:00
förälder 3fb205aba6
incheckning b38f447af7
2 ändrade filer med 52 tillägg och 0 borttagningar

26
Makefile Normal file
Visa fil

@ -0,0 +1,26 @@
# install http files into this directory
HTTPDIR=/tmp/zblog
# give all files to this owner after copy
OWNER != id -u
# give all files to this group after copy
GROUP != id -g
# set this mode on all directories
DIRMODE = 554
# set this mode on all files
FILEMODE = 444
.PHONY: clean install
all: clean build
build:
hugo
clean:
-rm -r public/*
install: build
cp -r public/ $(HTTPDIR)/
find $(HTTPDIR) ! -path $(HTTPDIR) -type d -exec chmod $(DIRMODE) {} +
find $(HTTPDIR) ! -path $(HTTPDIR) -type f -exec chmod $(FILEMODE) {} +
chown -R $(OWNER):$(GROUP) $(HTTPDIR)/

Visa fil

@ -24,3 +24,29 @@ documentation
The documentation on the markdown format can be found on the [blackfriday](https://github.com/russross/blackfriday)
project page.
building and installation
-------------------------
To build and install the website, use the following commands:
```
make clean install
```
The website is built automatically into the *public/* directory.
You can also add a number of variables, to modify the installation process.
```
# install http files into this directory
HTTPDIR=/tmp/zblog
# give all files to this owner after copy
OWNER != id -u
# give all files to this group after copy
GROUP != id -g
# set this mode on all directories
DIRMODE = 554
# set this mode on all files
FILEMODE = 444
```