aboutsummaryrefslogtreecommitdiff
path: root/.webpull
blob: 4fa75c1a9cb22ebbf6688ad139d2aa3ff751466f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

set -e

mkdir -p ./static
COPYFILES=$(find src -type f | egrep -v '\.(pug|md)$')

for CF in $COPYFILES; do
	CF_TO=static/${CF#"src/"}
	if [ ! -d $(dirname $CF_TO) ]; then
		mkdir -vp $(dirname $CF_TO)
	fi
	if [ ! -e $CF_TO ]; then
		ln -srv $CF $CF_TO
	fi
done

pug ./src --out ./static