]> git.plutz.net Git - confetti/blobdiff - action.sh
options for card editor, framework for editing actions
[confetti] / action.sh
diff --git a/action.sh b/action.sh
new file mode 100755 (executable)
index 0000000..f8fef05
--- /dev/null
+++ b/action.sh
@@ -0,0 +1,7 @@
+#!/bin/zsh
+
+ACTION="$(echo "$_GET[\"action\"]" |egrep '^[a-zA-Z0-9_-]+$')"
+ACTION="${_EXEC}/actions/${ACTION}.sh"
+[ -x "$ACTION" ] || echo -n "Location: http://$HTTP_HOST/?page=error"
+
+. $ACTION