geocation.com/build.sh

25 lines
522 B
Bash
Raw Normal View History

2022-04-09 17:10:24 -04:00
#!/bin/bash
set -euxo pipefail
cd "${BASH_SOURCE[0]%/*}"
rm -rf build
mkdir build
(
echo "Building HTML"
shopt -s extglob
while IFS= read -r -d '' || [[ "${REPLY}" ]]; do
cat header.html "${REPLY}" footer.html >"./build/${REPLY}"
done < <(find . -maxdepth 1 -type f -name '*.html' -not -name 'header.html' -and -not -name 'footer.html' -print0)
)
cp -vr css/ images/ build/
# (
# echo "Building images"
# for i in ./assets/*.*; do
# if (($(stat -c %Y "${i}") > $(stat -c %Y "${i}"))); then
# fi
# )