# HG changeset patch # User HIROSE Yuuji # Date 1486638865 -32373 # Node ID 388639a80a23c90ff85a8a54a0a0632996feed70 # Parent 138a0c6b09a767534447c5622007ba76dd4f649c Also notify rule in cached file should be generated dynamically. diff -r 138a0c6b09a7 -r 388639a80a23 s4-blog.sh --- a/s4-blog.sh Thu Feb 09 19:45:06 2017 +0859 +++ b/s4-blog.sh Thu Feb 09 20:13:58 2017 +0859 @@ -223,6 +223,8 @@ cachefile="$td/$id.row.html" stampfile="$td/$id.row.stamp" editlink="${edit:+編集 }" + nt="" # First, check the availability of user-icon. # If not existent, clear and reset row cache by rm $stampfile @@ -236,8 +238,6 @@ : Nothing to do else { ######## New ROW creation begins here ######## >$cachefile - nt="" tdcls="__NEWCLS__repatt" if [ -s "$icon" ]; then icfn=`echo "$icon"|htmlescape` @@ -253,7 +253,7 @@ ${picon}__EDIT__#$aid $uname $tm -${notify:+$nt} +<__NOTIFY__> EOF echo -n "" echo "$hte"|unhexize|htmlescape|hreflink|minitbl @@ -309,8 +309,9 @@ test -n "$stampfile" && date "+%F %T" > $stampfile fi # Printing a cached row - sed -e "//s,,${notify:+$nt}," \ $cachefile done