2018-05-23 15:39:40 +01:00
|
|
|
#!/usr/bin/env bash
|
2018-06-08 13:19:03 +01:00
|
|
|
|
|
|
|
set -e
|
|
|
|
err() { echo "error: line $(caller)"; }
|
|
|
|
trap err ERR
|
|
|
|
|
2021-04-30 09:39:09 +02:00
|
|
|
mkdir -p .build_cache
|
2018-05-23 15:39:40 +01:00
|
|
|
cd src/static
|
|
|
|
|
|
|
|
authors="../../build/static/authors.html"
|
|
|
|
|
|
|
|
sed "/REPLACETHIS/,$ d" authors.html > "$authors"
|
2021-04-30 09:39:09 +02:00
|
|
|
|
|
|
|
# If we're in a git repo, refresh the cache
|
|
|
|
if [ -d "../../.git/" ]; then
|
|
|
|
git shortlog -sn HEAD | cut -c8- | awk '!seen[$0]++' | sed 's/^/<p>/' | sed 's/$/<\/p>/' > ../../.build_cache/authors
|
|
|
|
fi
|
|
|
|
|
|
|
|
cat ../../.build_cache/authors >> "$authors"
|
|
|
|
|
2018-05-23 15:39:40 +01:00
|
|
|
sed "1,/REPLACETHIS/ d" authors.html >> "$authors"
|