#!/bin/bash BUF=$QUERY_STRING\& SKETCH_PARAMS= BRIM_PARAMS= while [[ -n $BUF ]]; do { KEY=`echo $BUF | awk '{ print substr($0,0,match($0,"=")); }'` BUF=`echo $BUF | awk '{ print substr($0,match($0,"=")+1); }'` VALUE=`echo $BUF | awk '{ print substr($0,0,match($0,"\&")); }'` BUF=`echo $BUF | awk '{ print substr($0,match($0,"\&")+1); }'` if [[ $KEY == "id" && -n $VALUE ]]; then { REF=$VALUE }; fi }; done BASEDIR=`mktemp -d` echo -e "\ data= \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ " >$BASEDIR/request.1 if [[ -z $REF ]]; then { echo "Content-Type: text/plain; charset=utf-8" echo echo "Please use an URL like ..?id=[id_of_relation]" exit 0 }; fi REQUEST_METHOD= /home/roland/osm-3s/cgi-bin/interpreter <$BASEDIR/request.1