#!/bin/sh # server for Mapper WEBPAGES=/web/cs/docs/people/staff/pjb WEBPAGES="~www/docs/academics/pjbrown/public_html" WEBPAGES="/home/pjbrown/public_html" PATH=.:/home/pjbrown/bin:/usr/java/bin:/usr/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/jdk/bin:/usr/X11R6/bin:/usr/local/jdk/bin:$PATH echo "Content-type: text/plain" echo # really we should use QUERY_STRING; see mtr's mail echo "" # this is a magic command that redirects all subsequent errors to stdout exec 2>&1 # do URL decodings # actually the conversion below have already been done RULES=`echo "$1" | sed "$SED_COMMANDS s/%20/ /g s/%2C/,/g s/%2c/,/g s/%2F/\//g s/%2f/\//g s/%3B/;/g s/%3b/;/g # for some reason %3B seems to become \; BUT the s/\\;/ still does not work, so we delete ANTHING before ';' # PS is the reason: all URL-encoded characters get \ put before them? #s/\\;/;/g s/.;/;/g # ... and similarly for < and > and ~ s/./>/g s/.~/~/g # s/%3D/=/g s/&/ /g "` # actually the conversion below have already been done PRESENT_CONTEXT=`echo "$2" | sed "$SED_COMMANDS s/%20/ /g s/%2C/,/g s/%2c/,/g s/%2F/\//g s/%2f/\//g s/%3B/;/g s/%3b/;/g # for some reason %3B seems to become \; BUT the s/\\;/ still does not work, so we delete ANTHING before ';' # PS is the reason: all URL-encoded characters get \ put before them? #s/\\;/;/g s/.;/;/g # ... and similarly for < and > s/./>/g s/.?/?/g # s/%3D/=/g s/%3d/=/g s/&/ /g "` if test ! -z "$3"; then echo "" fi echo "" # WAS: use -p and -P (thus assume old notation) #echo '" cd $WEBPAGES/semapper #echo '' #echo "" echo "" SWITCHES="-v" SWITCHES="-a" matcher $SWITCHES "$RULES" "$PRESENT_CONTEXT" #/usr/local/cs/pkg/jdk/bin/java -classpath /home/cur/pjb/java/semapper::/usr/local/cs/pkg/jdk/lib/classes.zip SeMapper -P "$RULES" "$MAPPED_CONTEXT"