OS4P_intro/gsite.sh
luc b68f771210
Some checks failed
Generate commit words of wisdom / build (push) Has been cancelled
gsite.sh: removed typo
2026-09-10 22:25:53 +02:00

24 lines
496 B
Bash
Executable file

#!/bin/bash
set -euo pipefail
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