1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
#! /bin/sh
# try to set up Unicode printing environment based on uniprint,
# the printing tool of the yudit editor
# (including download and compilation if necessary)
uver=`uniprint -h 2>&1 | sed -e "1 s,[^0-9]*\([0-9.]*\)\(.*\),\1," -e t -e d`
case "$uver" in
2.[7-9].*|2.[0-9][0-9]*|[3-9].*|[0-9][0-9].*)
echo found uniprint version $uver in your PATH
ok=true;;
[0-2].*)
echo found insufficient uniprint version $uver in your PATH
ok=false;;
*) echo did not find uniprint in your PATH
ok=false;;
esac
if $ok
then exit
fi
echo trying to find and download the most recent yudit package
wget -O y.index http://yudit.org/download/
yarch=`sed -e "s,.*>\([^<>]*.gz\).*,\1," -e t -e d y.index | tail -1`
rm -f y.index
wget -N http://yudit.org/download/$yarch
echo extracting yudit package
gzcat $yarch | tar xf -
yname=`basename $yarch .tar.gz`
cd $yname
echo making the yudit tool uniprint - this takes a while
PATH=/bin:$PATH
./configure
(cd stoolkit; make)
(cd swidget; make)
(cd swindow; make)
cd uniprint
make
echo generated $PWD/uniprint
cd ../..
cp $yname/uniprint/uniprint .
strip uniprint
echo copied to $PWD/uniprint
echo move it into a binary directory in your PATH
|