tridactyl/scripts/authors.sh
Colin Caine e710296d70 Fix authors not appearing when run non-interactively
git shortlog behaves differently when it's run non-interactively.
2018-06-08 13:34:41 +01:00

13 lines
324 B
Bash
Executable file

#!/usr/bin/env bash
set -e
err() { echo "error: line $(caller)"; }
trap err ERR
cd src/static
authors="../../build/static/authors.html"
sed "/REPLACETHIS/,$ d" authors.html > "$authors"
git shortlog -sn HEAD | cut -c8- | sed 's/^/<p>/' | sed 's/$/<\/p>/' >> "$authors"
sed "1,/REPLACETHIS/ d" authors.html >> "$authors"