diff options
Diffstat (limited to 'git-instaweb.sh')
-rwxr-xr-x | git-instaweb.sh | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/git-instaweb.sh b/git-instaweb.sh index e9fb5aa67a..6a65f255cc 100755 --- a/git-instaweb.sh +++ b/git-instaweb.sh @@ -320,9 +320,23 @@ EOF else # plain-old CGI resolve_full_httpd - list_mods=$(echo "$full_httpd" | sed "s/-f$/-l/") + list_mods=$(echo "$full_httpd" | sed 's/-f$/-l/') $list_mods | sane_grep 'mod_cgi\.c' >/dev/null 2>&1 || \ - echo "LoadModule cgi_module $module_path/mod_cgi.so" >> "$conf" + if test -f "$module_path/mod_cgi.so" + then + echo "LoadModule cgi_module $module_path/mod_cgi.so" >> "$conf" + else + $list_mods | grep 'mod_cgid\.c' >/dev/null 2>&1 || \ + if test -f "$module_path/mod_cgid.so" + then + echo "LoadModule cgid_module $module_path/mod_cgid.so" \ + >> "$conf" + else + echo "You have no CGI support!" + exit 2 + fi + echo "ScriptSock logs/gitweb.sock" >> "$conf" + fi cat >> "$conf" <<EOF AddHandler cgi-script .cgi <Location /gitweb.cgi> @@ -380,8 +394,15 @@ gitweb_css () { EOFGITWEB } +gitweb_js () { + cat > "$1" <<\EOFGITWEB +@@GITWEB_JS@@ +EOFGITWEB +} + gitweb_cgi "$GIT_DIR/gitweb/gitweb.cgi" gitweb_css "$GIT_DIR/gitweb/gitweb.css" +gitweb_js "$GIT_DIR/gitweb/gitweb.js" case "$httpd" in *lighttpd*) |