summaryrefslogtreecommitdiff
path: root/git-instaweb.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2006-07-26 16:33:18 +0200
committerJunio C Hamano <junkio@cox.net>2006-07-26 12:24:15 -0700
commit2b5d2d8792c861913d48bcfe02d8a6049c3911f5 (patch)
tree0b3f170abb7b1f6b83ce57784cfbd9d9a3da3ff9 /git-instaweb.sh
parentb7a036bb5f19d3b44443dcc319321663910250e8 (diff)
downloadgit-2b5d2d8792c861913d48bcfe02d8a6049c3911f5.tar.gz
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