X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-instaweb.sh;h=b79c6b6a42069168daf4e4ff191d08835f96e40f;hb=c2a33679a726aeb75529540c2b295f21023ddbc7;hp=9829c591543b0fe4dd55b996cb399d925dda08ab;hpb=24cf6e5847073d50390e0b7950e8e6b5a09103bc;p=git.git diff --git a/git-instaweb.sh b/git-instaweb.sh index 9829c5915..b79c6b6a4 100755 --- a/git-instaweb.sh +++ b/git-instaweb.sh @@ -8,18 +8,12 @@ USAGE='[--start] [--stop] [--restart] . git-sh-setup -case "$GIT_DIR" in -/*) - fqgitdir="$GIT_DIR" ;; -*) - fqgitdir="$PWD/$GIT_DIR" ;; -esac - -local="`git repo-config --bool --get instaweb.local`" -httpd="`git repo-config --get instaweb.httpd`" -browser="`git repo-config --get instaweb.browser`" -port=`git repo-config --get instaweb.port` -module_path="`git repo-config --get instaweb.modulepath`" +fqgitdir="$GIT_DIR" +local="`git config --bool --get instaweb.local`" +httpd="`git config --get instaweb.httpd`" +browser="`git config --get instaweb.browser`" +port=`git config --get instaweb.port` +module_path="`git config --get instaweb.modulepath`" conf=$GIT_DIR/gitweb/httpd.conf @@ -53,6 +47,13 @@ start_httpd () { return fi done + echo "$httpd_only not found. Install $httpd_only or use" \ + "--httpd to specify another http daemon." + exit 1 + fi + if test $? != 0; then + echo "Could not execute http daemon $httpd." + exit 1 fi } @@ -156,10 +157,20 @@ apache2_conf () { test "$local" = true && bind='127.0.0.1:' echo 'text/css css' > $fqgitdir/mime.types cat > "$conf" <> "$conf" + fi + done + cat >> "$conf" </dev/null || \ + $list_mods | grep 'mod_cgi\.c' >/dev/null 2>&1 || \ echo "LoadModule cgi_module $module_path/mod_cgi.so" >> "$conf" cat >> "$conf" <