Git development
 help / color / mirror / Atom feed
* [PATCH 4/5] git-instaweb: Fall back to Apache when LigHTTP was not found
@ 2006-07-26 14:34 Johannes Schindelin
  2006-07-26 19:22 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Schindelin @ 2006-07-26 14:34 UTC (permalink / raw)
  To: git, junkio, Eric Wong


Apache is more likely to be installed...

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
 git-instaweb.sh |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/git-instaweb.sh b/git-instaweb.sh
index 1d3ea73..242b55e 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -25,9 +25,6 @@ conf=$GIT_DIR/gitweb/httpd.conf
 
 # Defaults:
 
-# if installed, it doesn't need further configuration (module_path)
-test -z "$httpd" && httpd='lighttpd -f'
-
 # probably the most popular browser among gitweb users
 test -z "$browser" && browser='firefox'
 
@@ -135,6 +132,15 @@ do
 	shift
 done
 
+# if installed, it doesn't need further configuration (module_path)
+if [ -z "$httpd" ]; then
+	httpd='lighttpd -f'
+	which "$httpd" >/dev/null 2>&1 || httpd='apache2 -f'
+	which "$httpd" >/dev/null 2>&1 || httpd='apache -f'
+	which "$httpd" >/dev/null 2>&1 || httpd='httpd -f'
+	which "$httpd" >/dev/null || exit 1
+fi
+
 mkdir -p "$GIT_DIR/gitweb/tmp"
 GIT_EXEC_PATH="`git --exec-path`"
 GIT_DIR="$fqgitdir"
-- 
1.4.2.rc2.g6a4e

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-07-26 21:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-26 14:34 [PATCH 4/5] git-instaweb: Fall back to Apache when LigHTTP was not found Johannes Schindelin
2006-07-26 19:22 ` Junio C Hamano
2006-07-26 19:57   ` Johannes Schindelin
2006-07-26 21:11     ` [PATCH] instaweb: Be more clear if httpd or the browser fail Johannes Schindelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox