shithub: werc

Download patch

ref: 101efc6678befe93cef36cace5798a6abf0471f9
parent: 12823b51dae119112db5ce356866912ea1fdcae8
author: sl <[email protected]>
date: Mon Dec 9 14:46:57 EST 2019

apps/blagh/rss20.tpl: improve grep for <lastBuildDate>

--- a/apps/blagh/rss20.tpl
+++ b/apps/blagh/rss20.tpl
@@ -23,7 +23,7 @@
 %{
         # <webMaster>[email protected] (Uriel)</webMaster>
 	# rfc822 last time channel content changed.
-	lbd=`{ndate -m `{date `{mtime `{ls $blagh_root$blagh_dirs | grep -e '[0-9][0-9][0-9][0-9]' | tail -1} | awk '{print $1}'}}}
+	lbd=`{ndate -m `{date `{mtime `{ls $blagh_root$blagh_dirs | grep -e '^'$blagh_root$blagh_dirs'\/[0-9][0-9][0-9][0-9]$' | tail -1} | awk '{print $1}'}}}
 	echo '<lastBuildDate>'$"lbd'</lastBuildDate>'
 	# rfc822 publication date for content in the channel.
 	pubdate=`{ndate -m}