gsite.sh: add
This commit is contained in:
parent
3942d2e2f8
commit
32f5771918
1 changed files with 24 additions and 0 deletions
24
gsite.sh
Executable file
24
gsite.sh
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
#!/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
|
||||
Loading…
Add table
Add a link
Reference in a new issue