summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/texinfo/misc/tex3patch
diff options
context:
space:
mode:
authorgclarkii <gclarkii@FreeBSD.org>1994-09-13 13:51:34 +0000
committergclarkii <gclarkii@FreeBSD.org>1994-09-13 13:51:34 +0000
commita7c9d6c8b52a067267445732a70349e616440364 (patch)
tree2b66ba145d12f89d9ba01d79d9ffec98177551f3 /gnu/usr.bin/texinfo/misc/tex3patch
parentb9af6c1c08a206cb5e3a8e80cecdcbb9572b7485 (diff)
parent31fbfe9bebb8e48eaf39efc88875c743cf238ced (diff)
downloadFreeBSD-src-a7c9d6c8b52a067267445732a70349e616440364.zip
FreeBSD-src-a7c9d6c8b52a067267445732a70349e616440364.tar.gz
This commit was generated by cvs2svn to compensate for changes in r2726,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'gnu/usr.bin/texinfo/misc/tex3patch')
-rwxr-xr-xgnu/usr.bin/texinfo/misc/tex3patch71
1 files changed, 71 insertions, 0 deletions
diff --git a/gnu/usr.bin/texinfo/misc/tex3patch b/gnu/usr.bin/texinfo/misc/tex3patch
new file mode 100755
index 0000000..1708c75
--- /dev/null
+++ b/gnu/usr.bin/texinfo/misc/tex3patch
@@ -0,0 +1,71 @@
+#!/bin/sh
+# Auxiliary script to work around TeX 3.0 bug. ---- tex3patch ----
+# patches texinfo.tex in current directory, or in directory given as arg.
+
+ANYVERSION=no
+
+for arg in $1 $2
+do
+ case $arg in
+ --dammit | -d ) ANYVERSION=yes ;;
+
+ * ) dir=$arg
+ esac
+done
+
+if [ -z "$dir" ]; then
+ dir='.'
+fi
+
+if [ \( 2 -lt $# \) -o \
+ \( ! -f $dir/texinfo.tex \) ]; then
+ echo "To patch texinfo.tex for peaceful coexistence with Unix TeX 3.0,"
+ echo "run $0"
+ echo "with no arguments in the same directory as texinfo.tex; or run"
+ echo " $0 DIRECTORY"
+ echo "(where DIRECTORY is a path leading to texinfo.tex)."
+ exit
+fi
+
+if [ -z "$TMPDIR" ]; then
+ TMPDIR=/tmp
+fi
+
+echo "Checking for \`dummy.tfm'"
+
+( cd $TMPDIR; tex '\relax \batchmode \font\foo=dummy \bye' )
+
+grep -s '3.0' $TMPDIR/texput.log
+if [ 1 = "$?" -a "$ANYVERSION" != "yes" ]; then
+ echo "You probably do not need this patch,"
+ echo "since your TeX does not seem to be version 3.0."
+ echo "If you insist on applying the patch, run $0"
+ echo "again with the option \`--dammit'"
+ exit
+fi
+
+grep -s 'file not found' $TMPDIR/texput.log
+if [ 0 = $? ]; then
+ echo "This patch requires the dummy font metric file \`dummy.tfm',"
+ echo "which does not seem to be part of your TeX installation."
+ echo "Please get your TeX maintainer to install \`dummy.tfm',"
+ echo "then run this script again."
+ exit
+fi
+rm $TMPDIR/texput.log
+
+echo "Patching $dir/texinfo.tex"
+
+sed -e 's/%%*\\font\\nullfont/\\font\\nullfont/' \
+ $dir/texinfo.tex >$TMPDIR/texinfo.tex
+mv $dir/texinfo.tex $dir/texinfo.tex-distrib; mv $TMPDIR/texinfo.tex $dir
+
+if [ 0 = $? ]; then
+ echo "Patched $dir/texinfo.tex to avoid TeX 3.0 bug."
+ echo "The original version is saved as $dir/texinfo.tex-distrib."
+else
+ echo "Patch failed. Sorry."
+fi
+----------------------------------------tex3patch ends
+
+
OpenPOWER on IntegriCloud