#!/bin/bash installPerlCGI() { if [ "x$FULL_PERL_EXE" != "x" ] ; then echo " Using FULL_PERL_EXE = $FULL_PERL_EXE" elif [ "x$PERL_HOME" != "x" ] ; then echo " Constructing FULL_PERL_EXE from PERL_HOME=$PERL_HOME" export FULL_PERL_EXE="$PERL_HOME/bin/perl" else echo " Neither FULL_PERL_EXE or PERL_HOME set." echo " Constructing FULL_PERL_EXE from 'which perl'" export FULL_PERL_EXE=`which perl` fi echo " Substituting @FULL_PERL_EXE@ -> $FULL_PERL_EXE" cat src/cgi-bin/html-to-expeditee.pl.in \ | sed "s%@FULL_PERL_EXE@%$FULL_PERL_EXE%g" \ > ../../web/WEB-INF/cgi/html-to-expeditee.pl } if [ ! -d ../../web/ext/html-to-expeditee ] ; then echo "Making web extension directory for html-to-expeditee" mkdir ../../web/ext/html-to-expeditee fi if [ ! -d ../../web/ext/html-to-expeditee/jquery ] ; then echo "Copying jquery into web extension directory for html-to-expeditee" /bin/cp -r packages/jquery ../../web/ext/html-to-expeditee/. fi if [ ! -f ../../web/WEB-INF/cgi/html-to-expeditee.pl ] ; then echo "Installing html-to-expeditee.pl to cgi-bin directory" installPerlCGI elif [ "src/cgi-bin/html-to-expeditee.pl.in" -nt "../../web/WEB-INF/cgi/html-to-expeditee.pl" ] ; then echo "Installing latest version of html-to-expeditee.pl to cgi-bin directory" installPerlCGI fi