24 lines
496 B
Bash
Executable file
24 lines
496 B
Bash
Executable file
#!/bin/bash
|
|
set -euo pipefall
|
|
|
|
wow=$(shuf -n 1 wow.txt)
|
|
commit_message=$(git log -1 --pretty=%s)
|
|
date=$(date --iso-8601=seconds)
|
|
|
|
mkdir -p public
|
|
|
|
cat > public/index.html <<EOF
|
|
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Commit words of wisdom</title>
|
|
</head>
|
|
<body>
|
|
<h1>Commit words of wisdom</h1>
|
|
<p><strong>${wow}</strong></p>
|
|
<p>Latest commit: ${commit_message}</p>
|
|
<p>Generated: ${date}</p>
|
|
</body>
|
|
</html>
|
|
EOF
|