site/.webpull

19 lines
301 B
Bash
Executable file

#!/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