]> git.plutz.net Git - serve0/commitdiff
accept data and exec dir as arguments
authorPaul Hänsch <paul@plutz.net>
Wed, 25 Jul 2018 00:12:59 +0000 (02:12 +0200)
committerPaul Hänsch <paul@plutz.net>
Wed, 25 Jul 2018 00:12:59 +0000 (02:12 +0200)
index.cgi

index 8f21c83c296f8e077fa38a92ddf7d1c1407c858a..a620cf9a8525b2ed182dafd7dea890965602320c 100755 (executable)
--- a/index.cgi
+++ b/index.cgi
@@ -1,5 +1,10 @@
 #!/bin/sh
 
+for n in "$@"; do case ${n%%=*} in
+  data) _DATA="${n#data=}";;
+  exec) _exec="${n#exec=}";;
+esac; done
+
 [ -z "${_EXEC%/}" ] && _EXEC="$(realpath "${0%/*}")" || _EXEC="${_EXEC%/}"
 [ -z "${_DATA%/}" ] && _DATA=. || _DATA="${_DATA%/}"