chiark / gitweb /
new invoke script
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 5 Jul 2010 16:02:54 +0000 (17:02 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 5 Jul 2010 16:02:54 +0000 (17:02 +0100)
cgi-invoke [new file with mode: 0755]

diff --git a/cgi-invoke b/cgi-invoke
new file mode 100755 (executable)
index 0000000..ea20307
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+set -e
+exec with-lock-ex -w data/graph-lock sh -ec '
+       if ! test -d cache; then
+               quicksand-setup ||:
+               mkdir $GRAPH_CGI_CACHE
+               rm -f cache
+               ln -s $GRAPH_CGI_CACHE cache
+       fi
+       ./cgi "$@"
+' x "$@"