[last-changed] "hours/minutes/seconds ago" -> "today"
This commit is contained in:
parent
f3d75597a5
commit
a512a21c96
6
gen.sh
6
gen.sh
|
@ -53,6 +53,12 @@ done | sort -r > $sorted
|
|||
while read line; do
|
||||
file=$(echo $line | awk '{print $2}')
|
||||
relative=$(git log -n 1 --pretty=format:%cr $file)
|
||||
# instead of showing "x hours/minutes/seconds ago", show "today"
|
||||
if echo $relative | grep "hour" >/dev/null \
|
||||
|| echo $relative | grep "minute" >/dev/null \
|
||||
|| echo $relative | grep "second" >/dev/null; then
|
||||
relative="today"
|
||||
fi
|
||||
bn=$(basename $file .wtn)
|
||||
echo "<p><a href=\"$bn.html\">$bn</a> - $relative"
|
||||
done < $sorted >> $lastchanged
|
||||
|
|
Loading…
Reference in New Issue