commit f5f99464bb861e24817c63b481d7226bf6fb1341
parent 0ed4c84bd43d7bbf22349e493f41f3ccefb0b58b
Author: alex wennerberg <alex@alexwennerberg.com>
Date: Sun, 9 Apr 2023 18:48:25 -0400
use git instead of stat for file updated time
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build.sh b/build.sh
@@ -20,7 +20,7 @@ for file in $(find $srcdir); do
if [[ $file == *.html ]]; then
cat templates/header.html > $fn
cat $file >> $fn
- updated=`stat -c %z $file | awk '{print $1}'`
+ updated=`git log -1 --pretty="format:%ci" $file | awk '{print $1}'`
cat templates/footer.html | sed -e "s/{updated}/$updated/" >> $fn
else
cp $file $fn 2> /dev/null