]> git.plutz.net Git - shcgi/commitdiff
more debug info
authorpaul <paul@plutz.net>
Wed, 1 Jul 2015 15:48:40 +0000 (15:48 +0000)
committerpaul <paul@plutz.net>
Wed, 1 Jul 2015 15:48:40 +0000 (15:48 +0000)
svn path=/trunk/; revision=6

action.sh

index 5432664b288da1116d90a2ec349642e0a4a1c7ad..1f44ca10bf4c2a54c1cbdea7483fd2fd5ea9c1e5 100755 (executable)
--- a/action.sh
+++ b/action.sh
 
 ACTION="$(echo "$_GET[\"action\"]" |egrep '^[a-zA-Z0-9_-]+$')"
 ACTION="${_EXEC}/actions/${ACTION}.sh"
-[ -x "$ACTION" ] || echo -n "Location: ?p=error\n\n"
 
-. $ACTION
+if [ -x "$ACTION" ]; then
+  debug "trying to execute $ACTION"
+  . $ACTION
+else
+  debug "unable to execute $ACTION"
+  echo -n "Location: ?p=error\n\n"
+fi
+