From 2b28e1aa40a994f3f8e5ae08c1d8a95fb061014c Mon Sep 17 00:00:00 2001 From: mstsirkin Date: Mon, 25 Nov 2013 17:31:22 +0000 Subject: makehtml: more fedora work-arounds Signed-off-by: Michael S. Tsirkin git-svn-id: https://tools.oasis-open.org/version-control/svn/virtio@127 0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652 --- makehtml.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/makehtml.sh b/makehtml.sh index a708775..9dafdaf 100755 --- a/makehtml.sh +++ b/makehtml.sh @@ -14,7 +14,17 @@ sed 's/>~/>"/g' $SPECDOC.tmp2 >$SPECDOC.tmp3 sed 's/>=~/>="/g' $SPECDOC.tmp3 >$SPECDOC.tmp4 sed 's/~$SPECDOC.tmp5 -mv $SPECDOC.tmp5 $SPECDOC.html +#For some unclear reason we get 'fi' replaced by NULL character +# on Fedora. file recognizes result as a binary data. +# Detect and work around this. +if test `file -b $SPECDOC.tmp5` = 'data'; +then + perl -p -e 's/\0/fi/g' $SPECDOC.tmp5 >$SPECDOC.tmp6 +else + cp $SPECDOC.tmp5 $SPECDOC.tmp6 +fi + +mv $SPECDOC.tmp6 $SPECDOC.html rm $SPECDOC.tmp* #uncomment if you have a broken t4ht -- cgit v1.2.3