tunuifranken.info/bin/create-index.sh

17 lines
395 B
Bash
Raw Normal View History

2021-01-04 13:53:39 +01:00
#!/bin/bash
2021-03-05 16:18:59 +01:00
# This script is executed by make in the parent directory
2021-01-04 13:53:39 +01:00
[ "$HOSTNAME" != lime2 ] || exit 1
2021-03-12 12:23:00 +01:00
if [ "$VERBOSE" = true ]; then
echo "Updating index.html"
fi
2021-01-04 13:53:39 +01:00
chmod 644 ./index.html
2021-01-05 11:11:51 +01:00
awk -v header="$(<./header.html)" '{sub(/===HEADER===/,header)} 1' ./index.template.html |
awk -v footer="$(<./footer.html)" '{sub(/===FOOTER===/,footer)} 1' > ./index.html
chmod 444 ./index.html