#!/bin/sh # J. Welsh, May 2023 # unique prefix for fragment identifiers, in case multiple articles are viewed per page (derived from article ID of the saved draft) aprefix=a233 printf '
Name | Type | Files | Insertions | Deletions |
---|---|---|---|---|
%s | \n' $aprefix `basename $pname .patch` $pname printf '\t%s | \n' "$type" diffstat -s $pname | awk ' BEGIN { RS="," } /changed/ { changed=$1 } /insertions/ { ins=$1 } /deletions/ { del=$1 } END { printf("\t%d | \n", changed); printf("\t+%d | \n", ins); printf("\t-%d | \n", del); }' echo '
' sed -n '/^diff/ q; /^$/,$ { s/^ //; s/&/\&/g; s/\</g; s/((/(\(/g; s/))/)\)/g; s|^\( *.*\)|' done\1|; s/fixpoint.welshcomputing.com/jfxpt.com/g; s|\(http://[^ ]*\)|\1|g; p }' $pname echo '