[NTG-context] Linux upgrade

gnwiii at gmail.com gnwiii at gmail.com
Thu Jul 6 01:56:27 CEST 2006


On 6/23/06, Taco Hoekwater <taco at elvenkind.com> wrote:

> John R. Culleton wrote:
> >
> > Let me start all over. Assuming a working TeX installation
> > (either tetex or texlive 2005) what incantation must I perform to
> [...]
> After following those instructions, everything should be ok except
> for the new ruby script links and texmfstart's warning. For
> that, do the following:
>
>    * make sure you have ruby installed. If not, do that first
>
>    * go to the scripts/context/stubs/unix/ directory in your
>      freshly unpacked ConTeXt distribution, make sure you
>      have write permissions to the TeX binaries directory,
>      and run something like the shell script that follows.
> [...]

This script creates copies of the scripts and has to be run each time
the scripts are updated.
Whenever you make copies Murphy's law says the two versions will diverge.
I'd suggest creating wrapper scripts, one each for perl, ruby, and
java scripts in the directory with the texexec, etc. scripts as
follows:

   ----------------- runtexmfrb ----------------
#! /bin/sh
# runtexmfrb -- run ruby scripts with "ruby <path>texmfstart.rb .."
# Author: George N. White III <gnwiii at gmail.com>
# Date: 2006-06-25
# to use: link (ln -s) to the names of ConTeXt scripts in your tex bin
# directory, e.g.,
# cd <...>/bin/<arch>
# for f in texmfstart texexec pstopdf textools texutil ctxtools
pdftools rlxtools texsync ; do ln -s runtexmfrb $f ; done
#
# requires:
# ruby, sed, kpsewhich

what=`echo $0 | sed 's at .*/@@'`

p=`kpsewhich -format=texmfscripts texmfstart.rb`
{ test -n "$p" && test -f "$p"; } \
   || { echo "\`texmfstart.rb' not found."; exit 1; }

# for texmfstart just
case $what in
texmfstart)
exec ruby "$p" ${1+"$@"}
  ;;
*)
q=`kpsewhich -format=texmfscripts $what.rb`
{ test -n "$q" && test -f "$q"; } \
   || { echo "\`$what.rb' not found."; exit 1; }
exec ruby "$p" "$what.rb" ${1+"$@"}
 ;;
esac
   ----------------- end runtexmfrb ----------

   ----------------- runtexmfjar ----------------
#!/bin/sh
# runtexmfjar -- run texmf Java app
# Author: George N. White III <gnwiii at gmail.com>
# Date: 2006-06-25
# to use: link to the names of the apps:
# e.g., "ln -s runtexmfjar JabRef"

java=/usr/java/jre1.5.0/bin/java
what=`echo $0 | sed 's at .*/@@'`

p=`kpsewhich -format=texmfscripts $what.jar`
{ test -n "$p" && test -f "$p"; } \
  || { echo "\`$what.jar' not found."; exit 1; }
exec "$java" -jar "$p" ${1+"$@"}
   ----------------- end runtexmfjar ----------

   ----------------- runtexmfpl ----------------
#!/bin/sh
# runtexmfpl -- run texmf perl script
# to use: link to the names of the apps:
# e.g., "ln -s runtexmfpl epstopdf"

what=`echo $0 | sed 's at .*/@@'`

p=`kpsewhich -format=texmfscripts $what.pl`
{ test -n "$p" && test -f "$p"; } \
  || { echo "\`$what.pl' not found."; exit 1; }
exec perl "$p" ${1+"$@"}
   ----------------- end runtexmfpl ----------

The advantage of this approach is that you run the latest script
versions after a new cont-tmf is installed without having to copy
updated scripts to the "bin" directory.  I use runtexmfjar for
JabRef.jar, which lives in texmf-local/scripts.

-- 
George N. White III <aa056 at chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia


More information about the ntg-context mailing list