echo "*** SiTeX 3.141 Installation program"
echo "*** ================================"
echo "***"
echo "*** Do not forget to retrieve the files *.tex and *.sty"
echo "*** from eiunix.tuwien.ac.at:/pub/sisisi/COMMON and"
echo "*** copy them into your TEXINPUTS path."
echo "***"
echo "***"
echo "*** Before the installation can continue, you have to"
echo "*** follow the guidelines from the TeX3.141 distribution"
echo "*** and set the pathnames in the several Makefile.in"
echo "*** for your site's needs."
echo "*** Do not run configure, it is started by this script."
echo "***"
echo "*** If you want to stop the installation, press 'q' now."
echo "*** Press <cr> to continue."
read x
if [ "$x" = "q" ]
then
exit
fi
echo
echo "Starting installation of SiTeX3.141"
echo
cd $TEXDIR
echo "Changing to $TEXDIR"
if [ ! -f tex.web.orig ]
then
echo "Saving tex.web in tex.web.orig"
mv tex.web tex.web.orig
fi
if [ ! -f tex.ch.orig ]
then
echo "Saving tex.ch in tex.ch.orig"
mv tex.ch tex.ch.orig
fi
if [ ! -f Makefile.in.orig ]
then
echo "Saving Makefile.in in Makefile.in.orig"
mv Makefile.in Makefile.in.orig
fi
echo "Modifying Makefile.in for tex9.c"
sed -e 's/#.*tex9_o/tex9_o/' < Makefile.in.orig > Makefile.in
cd $SISISIDIR
echo "Changing to $SISISIDIR"
echo "Uncompressing sitex.web.Z to $TEXDIR/tex.web"
uncompress <sitex.web.Z >$TEXDIR/tex.web
echo "Copying tex.ch to $TEXDIR/tex.ch"
cp tex.ch $TEXDIR/tex.ch
cd $WEBDIR
echo "Changing to $WEBDIR"
if [ ! -f tangle.ch.orig ]
then
echo "Saving tangle.ch in tangle.ch.orig"
mv tangle.ch tangle.ch.orig
fi
echo "Modifying tangle.ch for bigger name space"
sed -e '/@!stack_size=50/i\
@!max_names=4000; {number of identifiers, strings, module names;\
must be less than 10240}\
@y\
@!max_names=9000; {number of identifiers, strings, module names;\
must be less than 10240}\
@z\
\
@x' < tangle.ch.orig > tangle.ch
sleep 5
touch tangleboot.p
sleep 5
touch tangleboot.c tangleboot.h
cd $WEB2CDIR
echo "Changing to $WEB2CDIR"
if [ ! -f web2c.c.orig ]
then
echo "Saving web2c.c in web2c.c.orig"
mv web2c.c web2c.c.orig
fi
if [ ! -f web2c.h.orig ]
then
echo "Saving web2c.h in web2c.h.orig"
mv web2c.h web2c.h.orig
fi
echo "Modifying web2c.[ch] for bigger tables"
sed -e 's/var_list\[200]/var_list\[500]/'\
-e 's/field_list\[200]/field_list\[500]/' < web2c.c.orig > web2c.c
sed -e 's/var_list\[200]/var_list\[500]/'\
-e 's/field_list\[200]/field_list\[500]/' < web2c.h.orig > web2c.h
cd $MAKEDIR
echo "Changing to $MAKEDIR"
echo "Running configure"
/configure
echo "*** Now that configure has finished, you might want"
echo "*** to inspect or change the Makefiles, as suggested"
echo "*** in TeX3.141's INSTALL file (Step 4)."
echo "*** Press 's' to suspend the installation and start"
echo "*** an interactive shell, <cr> to continue."
read x
if [ "$x" = "s" ]
then
echo "Type 'exit' to quit the shell and continue with the installation."
${SHELL:-/bin/sh}
fi
cd $MAKEDIR
echo "Changing to $MAKEDIR"
echo "Now starting: \`make TeX'"
make TeX
cd $MAKEDIR
echo "Returning to $MAKEDIR"
echo "Continuing: \`make TeX'"
make TeX
cd $TEXDIR
if [ ! -x virtex ]
then
echo "*** There seems to be something wrong; virtex doesn't exist."
echo "*** Obviously, the installation has failed."
exit 1
fi
echo "Creating the formatfiles in $TEXDIR"
echo
echo "If siplain.tex, silplain.tex, sihyphen.tex and def_umlaut.tex are not"
echo "in one of the TEXINPUTS directories, you will now run into trouble."
echo "(You will be prompted for their pathnames and have to type in"
echo "the whole stuff.)"
mv tex.pool sitex.pool
TEXPOOL=. ./initex siplain.tex \\dump
if [ -f siplain.fmt ]
then
mv siplain.fmt sitex.fmt
echo "...sitex.fmt created"
else
echo "siplain.fmt not created for unknown reasons."
fi
TEXPOOL=. ./initex silplain.tex \\dump
if [ -f silplain.fmt ]
then
mv silplain.fmt silatex.fmt
echo "...silatex.fmt created"
else
echo "silplain.fmt not created for unknown reasons."
fi
echo "*** The installation is now complete."
echo "*** You should find the following files in $TEXDIR:"
echo "***"
echo "*** sitex.fmt, silatex.fmt, hf3,"
echo "*** sitex.pool, virtex and initex."
echo "***"
echo "*** Now copy sitex.fmt and silatex.fmt into a TEXFORMAT-Dir,"
echo "*** virtex and initex into a directory holding executables"
echo "*** (preferably as sivirtex and siinitex), hf3 into"
echo "*** a TEXINPUTDIR, and sitex.pool into the TEXPOOLDIR."
echo "*** Also create links silatex and sitex to sivirtex, and"
echo "*** a link named siplain.fmt to sitex.fmt, all in the"
echo "*** appropriate directories."