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