parent
84f3c589de
commit
0982212464
|
@ -52,11 +52,11 @@ lasthash=
|
|||
while read hash commit ts id subject; do
|
||||
# ignore commits that begin with ':'
|
||||
[[ "$subject" == :* ]] && {
|
||||
echo "[HTML] Ignoring $commit: $subject" >&2
|
||||
echo "Ignoring $commit: $subject" >&2
|
||||
continue
|
||||
}
|
||||
|
||||
echo "[HTML] Found $commit: $subject" >&2
|
||||
echo "Found $commit: $subject" >&2
|
||||
|
||||
dateout="$( ./tsdate "$ts" %Y-%m-%d )"
|
||||
dategroup="${dateout%-*}"
|
||||
|
|
30
repo2html
30
repo2html
|
@ -20,6 +20,26 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# #
|
||||
|
||||
_stderrout()
|
||||
{
|
||||
prefix="$1"
|
||||
sed 's/^/['"$prefix"'] /g' >&2
|
||||
}
|
||||
|
||||
_rssout()
|
||||
{
|
||||
_stderrout 'RSS'
|
||||
}
|
||||
_htmlout()
|
||||
{
|
||||
_stderrout 'HTML'
|
||||
}
|
||||
_reout()
|
||||
{
|
||||
_htmlout 2> >( _stderrout 'Reprocessing' )
|
||||
}
|
||||
|
||||
|
||||
# repository detection
|
||||
repotype=
|
||||
if repodir="$( git rev-parse --git-dir 2>/dev/null )"; then
|
||||
|
@ -94,17 +114,19 @@ export cref_errlog="$cref_errlog_first"
|
|||
# reference and further processing)
|
||||
listcache=.list
|
||||
"$repotype"/list | tee \
|
||||
>( ./rss "$repotype" "$url_root" "$rss_count" > "$path_out/rss.xml" ) \
|
||||
>( ./rss "$repotype" "$url_root" "$rss_count" \
|
||||
> "$path_out/rss.xml" \
|
||||
2> >( _rssout )
|
||||
) \
|
||||
"$listcache" \
|
||||
| ./processor "$repotype" "$path_out"
|
||||
| ./processor "$repotype" "$path_out" 2> >( _htmlout )
|
||||
|
||||
# re-process cref errors (but only once; any errors at this point will be
|
||||
# considered to be problem refs)
|
||||
export cref_errlog=.cref-bad
|
||||
>"$cref_errlog"
|
||||
grep -f"$cref_errlog_first" "$listcache" \
|
||||
| ./processor "$repotype" "$path_out" \
|
||||
2> >( sed 's/^/[Reprocessing] /g' >&2 )
|
||||
| ./processor "$repotype" "$path_out" 2> >( _reout )
|
||||
|
||||
# if any invalid crefs remain, then they're bad
|
||||
[ ! -s "$cref_errlog" ] || {
|
||||
|
|
6
rss
6
rss
|
@ -44,11 +44,11 @@ EOH
|
|||
while read hash commit ts id subject; do
|
||||
# ignore commits that begin with ':'
|
||||
[[ "$subject" == :* ]] && {
|
||||
echo "[RSS] Ignoring $commit: $subject" >&2
|
||||
echo "Ignoring $commit: $subject" >&2
|
||||
continue
|
||||
}
|
||||
|
||||
echo "[RSS] Found $commit: $subject" >&2
|
||||
echo "Found $commit: $subject" >&2
|
||||
|
||||
# TODO: avoid HTML entities where browsers may decide not to render them (e.g.
|
||||
# the title)
|
||||
|
@ -73,7 +73,7 @@ EOE
|
|||
# the check, meaning that if the count is 0, then we will output every commit
|
||||
((i++))
|
||||
[ "$i" -eq "$count" ] && {
|
||||
echo "[RSS] Limit of $count reached." >&2
|
||||
echo "Limit of $count reached." >&2
|
||||
break
|
||||
}
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue