diff options
Diffstat (limited to 'print/xdvi/scripts/configure')
-rw-r--r-- | print/xdvi/scripts/configure | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/print/xdvi/scripts/configure b/print/xdvi/scripts/configure new file mode 100644 index 000000000000..8a19b3a88239 --- /dev/null +++ b/print/xdvi/scripts/configure @@ -0,0 +1,46 @@ +#!/bin/sh + +if [ $# != 3 ]; then exit 1; fi + +SRCDIR=$3 + +# paper size, default is no nor A4 +A4=n +#default font cache directory: must be world writable +CACHE=/tmp + + +if [ ! -f $SRCDIR/MakeTeXPK.orig ]; then + mv $SRCDIR/MakeTeXPK $SRCDIR/MakeTeXPK.orig || exit 1 +fi +#find the resolutions +RES=`awk '{if(/test $BDPI/) printf "%s ",$5}' < $SRCDIR/MakeTeXPK.orig` +# and the corresponding modes +MODES=`awk -F= '{if(/MODE=[a-zA-Z]/) print $2}' < $SRCDIR/MakeTeXPK.orig` +set $MODES +echo "I need to set the mode of our printing/output device for the resolutions" +echo "$RES dpi. (the mode must be in your modes.mf file)" +SUBST= +for i in $RES; do + echo -n "mode for $i dpi [$1]: "; + read answ; if [ "$answ" = "" ]; then answ=$1; fi + SUBST="$SUBST -e s/MODE=$1/MODE=$answ/" + shift +done + +echo "Choose a font cache directory for automatic font generation" +echo -n "(this directory must be world writable) [$CACHE]: " +read answ; if [ "$answ" != "" ]; then CACHE=$answ; fi + +sed -e s:/usr/lib/tex:/usr/local/lib/texmf: \ + -e s:/LocalLibrary/Fonts/TeXFonts:$CACHE: \ + $SUBST <$SRCDIR/MakeTeXPK.orig >$SRCDIR/MakeTeXPK + + +# Imakefile +chmod +w $SRCDIR/Imakefile +echo "OSDEFS=" >> $SRCDIR/Imakefile || exit 1; +echo "OPTIONDEFS=-DUSE_PK -DGREY -DPS_GS -DMAKEPK -DBUTTONS" >> $SRCDIR/Imakefile +echo "DEFAULT_FONT_PATH=/usr/local/lib/texmf/fonts/pk:$CACHE/pk" >> $SRCDIR/Imakefile +echo "DEFAULT_VF_PATH=/usr/local/lib/texmf/fonts/vf" >> $SRCDIR/Imakefile +exit 0; |