diff --git a/schhist/schhist2web b/schhist/schhist2web
index f619b74..09ad7f1 100755
--- a/schhist/schhist2web
+++ b/schhist/schhist2web
@@ -96,12 +96,23 @@ EOF
}
+#
+# Add extra : for :name: and :name= because they consume the leading : while
+# =name: and =name= don't and would therefore be placed one position later.
+#
ordered_names()
{
ls -1 "$out/names" | (
- order=:$SCHHIST_ORDER:
while read n; do
- echo "${order%%:$n:*}" | tr -cd : | wc -c | tr '\n' ' '
+ if [ "${order%%:$n=*}" != "$order" ]; then
+ echo "${order%%:$n=*}":
+ elif [ "${order%%=$n:*}" != "$order" ]; then
+ echo "${order%%=$n:*}"
+ elif [ "${order%%=$n=*}" != "$order" ]; then
+ echo "${order%%=$n:*}"
+ else
+ echo "${order%%:$n:*}":
+ fi | tr -cd : | wc -c | tr '\n' ' '
echo "$n"
done; ) |
sort -n -s | sed 's/^[^ ]* //'
@@ -215,6 +226,7 @@ fi
PATH=`dirname "$0"`:"$PATH"
first=`gitenealogy "$dir" "$sch" | sed '$s/ .*//p;d'`
schname=`gitenealogy "$dir" "$sch" | sed '$s/^.* //p;d'`
+order=:$SCHHIST_ORDER:
rm -rf "$out/*/"{diff,thumb,html,pdf} "$out/names"
$no_cache && rm -rf "$cache"
@@ -347,6 +359,7 @@ EOF
EOF
while read m; do
+ [ "${order%%=$m[:=]*}" = "$order" ] || continue
ps="$cache/$head/ps/$m.ps"
if [ -r "$ps" ]; then
#
@@ -392,8 +405,14 @@ for n in `cd "$dir" && git rev-list $first..HEAD~1` $first; do
thumb="$out/$next/thumb/$m.png"
pdf="$out/$next/pdf/$m.pdf"
+ if [ "${order%%=$m[:=]*}" = "$order" ]; then
+ td=true
+ else
+ td=false
+ fi
+
if [ -f "$a0" -a -f "$b0" ]; then
- s="$s"
+ $td && s="$s | "
if ! pngdiff cat "$diff" "$a1" "$b1" "$a0" "$b0"; then
s="$s"
continue
@@ -402,19 +421,19 @@ for n in `cd "$dir" && git rev-list $first..HEAD~1` $first; do
exit
schps2pdf -T BEFORE -T AFTER -o "$pdf" "$aps" "$bps" || exit
elif [ -f "$a0" ]; then
- s="$s | "
+ $td && s="$s | "
pngdiff cat "$diff" -f -c 1,0,0 "$a1" "$a1" || exit
pngdiff shrink "$thumb" -f $THUMB_OPTS -c 1,0,0 "$a2" "$a2" ||
exit
schps2pdf -T DELETED -o "$pdf" "$aps" || exit
elif [ -f "$b0" ]; then
- s="$s | "
+ $td && s="$s | "
pngdiff cat "$diff" -f -c 0,1,0 "$b1" "$b1" || exit
pngdiff shrink "$thumb" -f $THUMB_OPTS -c 0,1,0 "$b2" "$b2" ||
exit
schps2pdf -T NEW -o "$pdf" "$bps" || exit
else
- s="$s | "
+ $td && s="$s | "
continue
fi
echo "$s"
@@ -445,7 +464,7 @@ if [ -d "$cache/$next/ppm0" ]; then # could this ever be false ?
thumb="$out/$next/thumb/$m.png"
pdf="$out/$next/pdf/$m.pdf"
- echo " | "
+ [ "${order%%=$m[:=]*}" = "$order" ] && echo " | "
[ -f "$p1" ] || continue
pngdiff cat "$diff" -f -c 0,1,0 "$p1" "$p1" || exit
pngdiff shrink "$thumb" -f $THUMB_OPTS -c 0,1,0 "$p2" "$p2" ||
|