#!/bin/sh # script to launch an application # parameters are directory of application; application name; map X scaling; map Y scaling MASTER_DIR=pjb_webpages export MASTER_DIR PARAMS=$MASTER_DIR/tmp/params export PARAMS LOGFILE=$MASTER_DIR/tmp/cgilog # a kludge to allow scripts to run at Xerox if in UKC terms SED_COMMANDS="" # default null #if test -d /home/brown; then #SED_COMMANDS='s/cur.pjb/brown/' # convert cur/pjb to brown #fi # remember the parameters rm -f $PARAMS echo $QUERY_STRING | sed "$SED_COMMANDS s/%20/ /g s/%2F/\//g s/%2C/,/g s/%3B/;/g s/&/ /g " >$PARAMS &2>1 cat $PARAMS > $LOGFILE chmod 666 $PARAMS $LOGFILE # so that someone else can delete them ./generate_head launch echo "

trying launch with QUERY_STRING=$QUERY_STRING and LOGFILE=$LOGFILE and PARAMS=$PARAMS; content of PARAMS =`cat $PARAMS` ;" #echo "

Try to look at pjb"; ls -ld /home/cur/pjb 2>&1 cat $PARAMS 2>&1 ls -l pjb_webpages/tmp 2>&1 . $PARAMS 2>&1 # . means source # use .notes if there, otherwise .nts; otherwise .sgo SUFFIX=notes if test ! -f $DIR/$APP.notes; then SUFFIX=nts if test ! -f $DIR/$APP.nts; then SUFFIX=sgo fi fi echo HERE is `pwd` and SUFFIX is $SUFFIX and DIR is $DIR and APP is $APP and arg 1 is $1 and QUERY_STRING is $QUERY_STRING >> $LOGFILE # test if frames are required SWITCH=-h #default if test x"$FRAMES" = xY; then echo trying substitution for $APP and $DIR and $FRAMES >> /tmp/cgilog #echo TRYING SWITCH="-hf $DIR/extra_menu_frame.notes" >>/tmp/cgilog SWITCH="-hf $DIR/extra_menu_frame.notes" # add extra menu-frame note fi # test if extra tours, in separate files, should be loaded first # alternatively, tours can be subnames of the main name, e.g. # ukc.notes ukc_tour1.notes ukc_tour2.notes, ... see use of APP* below T= #default if test x"$TOURS" != x; then T=$DIR/$TOURS.$SUFFIX # todo cater for more than one tour fi # launch the server (if not already running) rm -f /tmp/entities.sgml # so that the new one is used echo "calling ./call_client -cs $T $SWITCH -f $DIR/$APP*.$SUFFIX -t" >> $LOGFILE ./call_client -cs $T $SWITCH -f $DIR/$APP*.$SUFFIX -t