#!/bin/sh set -e exec with-lock-ex -w data/graph-lock sh -ec ' if ! test -d cache; then quicksand-setup ||: if ! test -d $GRAPH_CGI_CACHE; then mkdir $GRAPH_CGI_CACHE; fi rm -f cache ln -s $GRAPH_CGI_CACHE cache fi if test cgi -nt cache/.; then rm -f cache/* fi ./cgi "$@" ' x "$@"