22 lines
420 B
Bash
Executable file
22 lines
420 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# This script is executed by make in the parent directory
|
|
|
|
main() {
|
|
verbose "Updating index.html"
|
|
|
|
chmod 644 ./index.html
|
|
|
|
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
|
|
}
|
|
|
|
verbose() {
|
|
if [ "$VERBOSE" = true ]; then
|
|
echo "$@"
|
|
fi
|
|
}
|
|
|
|
main
|