Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2006-07-26 18:33:18 +0400
committerJunio C Hamano <junkio@cox.net>2006-07-26 23:24:15 +0400
commit2b5d2d8792c861913d48bcfe02d8a6049c3911f5 (patch)
tree0b3f170abb7b1f6b83ce57784cfbd9d9a3da3ff9 /git-instaweb.sh
parentb7a036bb5f19d3b44443dcc319321663910250e8 (diff)
git-instaweb: some Apache have mod_cgi builtin
So test for it, and do not always try to load mod_cgi.o. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-instaweb.sh')
-rwxr-xr-xgit-instaweb.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/git-instaweb.sh b/git-instaweb.sh
index 63b18b99f6..9829c59154 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -183,8 +183,10 @@ PerlPassEnv GIT_EXEC_DIR
EOF
else
# plain-old CGI
+ list_mods=`echo "$httpd" | sed "s/-f$/-l/"`
+ $list_mods | grep 'mod_cgi\.c' >/dev/null || \
+ echo "LoadModule cgi_module $module_path/mod_cgi.so" >> "$conf"
cat >> "$conf" <<EOF
-LoadModule cgi_module $module_path/mod_cgi.so
AddHandler cgi-script .cgi
<Location /gitweb.cgi>
Options +ExecCGI