summaryrefslogtreecommitdiff
path: root/git-instaweb.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2006-07-26 23:11:46 +0200
committerJunio C Hamano <junkio@cox.net>2006-07-26 14:29:40 -0700
commit5209eda86363a3ba2e000903ad8de29589b18b58 (patch)
treecc1b0d641f3ee27ae069cf31648e4e19f50f9166 /git-instaweb.sh
parent24cf6e5847073d50390e0b7950e8e6b5a09103bc (diff)
downloadgit-5209eda86363a3ba2e000903ad8de29589b18b58.tar.gz
instaweb: Be more clear if httpd or the browser fail
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.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/git-instaweb.sh b/git-instaweb.sh
index 9829c59154..16cd351f7f 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -54,6 +54,10 @@ start_httpd () {
fi
done
fi
+ if test $? != 0; then
+ echo "Could not execute http daemon $httpd."
+ exit 1
+ fi
}
stop_httpd () {
@@ -184,7 +188,7 @@ EOF
else
# plain-old CGI
list_mods=`echo "$httpd" | sed "s/-f$/-l/"`
- $list_mods | grep 'mod_cgi\.c' >/dev/null || \
+ $list_mods | grep 'mod_cgi\.c' >/dev/null 2>&1 || \
echo "LoadModule cgi_module $module_path/mod_cgi.so" >> "$conf"
cat >> "$conf" <<EOF
AddHandler cgi-script .cgi
@@ -234,4 +238,5 @@ esac
start_httpd
test -z "$browser" && browser=echo
-$browser http://127.0.0.1:$port
+url=http://127.0.0.1:$port
+$browser $url || echo $url