diff options
author | mstsirkin <mstsirkin@0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652> | 2013-11-25 17:31:22 +0000 |
---|---|---|
committer | mstsirkin <mstsirkin@0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652> | 2013-11-25 17:31:22 +0000 |
commit | 2b28e1aa40a994f3f8e5ae08c1d8a95fb061014c (patch) | |
tree | f795c0c79f58830356303531cecd2b1294ba0c9f /makehtml.sh | |
parent | 306b6bbebd41fc5b703f8feb274d9e3b3f1c1210 (diff) |
makehtml: more fedora work-arounds
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
git-svn-id: https://tools.oasis-open.org/version-control/svn/virtio@127 0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652
Diffstat (limited to 'makehtml.sh')
-rwxr-xr-x | makehtml.sh | 12 |
1 files changed, 11 insertions, 1 deletions
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/~</"</g' $SPECDOC.tmp4 >$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 |