contrib/subtree: fix broken &&-chains and revealed test error
[gitweb.git] / git-instaweb.sh
index e93a2386754342ce759b568fc360488119c09a2d..47e38f34c3a871349630660e6e3387d554c29d36 100755 (executable)
@@ -5,6 +5,7 @@
 
 PERL='@@PERL@@'
 OPTIONS_KEEPDASHDASH=
+OPTIONS_STUCKLONG=
 OPTIONS_SPEC="\
 git instaweb [options] (--start | --stop | --restart)
 --
@@ -19,6 +20,7 @@ start          start the web server
 restart        restart the web server
 "
 
+SUBDIRECTORY_OK=Yes
 . git-sh-setup
 
 fqgitdir="$GIT_DIR"
@@ -203,7 +205,7 @@ webrick_conf () {
        # actual gitweb.cgi using a shell script to force it
   wrapper="$fqgitdir/gitweb/$httpd/wrapper.sh"
        cat > "$wrapper" <<EOF
-#!/bin/sh
+#!@SHELL_PATH@
 # we use this shell script wrapper around the real gitweb.cgi since
 # there appears to be no other way to pass arbitrary environment variables
 # into the CGI process
@@ -344,7 +346,17 @@ PidFile "$fqgitdir/pid"
 Listen $bind$port
 EOF
 
-       for mod in mime dir env log_config
+       for mod in mpm_event mpm_prefork mpm_worker
+       do
+               if test -e $module_path/mod_${mod}.so
+               then
+                       echo "LoadModule ${mod}_module " \
+                            "$module_path/mod_${mod}.so" >> "$conf"
+                       # only one mpm module permitted
+                       break
+               fi
+       done
+       for mod in mime dir env log_config authz_core
        do
                if test -e $module_path/mod_${mod}.so
                then