summaryrefslogtreecommitdiff
path: root/util/sitemap.sh
blob: 643ed445e7a819995b4c84a7c66a67b4c5af6bd6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash

url="${1%/}"
mdpath="$2"
htmlpath="${3#/}"

date=$(git log -1 --format=%cs "$mdpath")

cat <<_EOF
<url>
<loc>$(echo $url/$htmlpath)</loc>
<lastmod>$date</lastmod>
</url>
_EOF