summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 46eb449)
raw | patch | inline | side by side (parent: 46eb449)
author | Shawn O. Pearce <spearce@spearce.org> | |
Wed, 17 Oct 2007 01:33:11 +0000 (21:33 -0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Wed, 17 Oct 2007 02:48:03 +0000 (22:48 -0400) |
This fixes git-instaweb so it can start an httpd without warning
about an invalid test command. Yes its ugly, but its also quite
portable.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
about an invalid test command. Yes its ugly, but its also quite
portable.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-instaweb.sh | patch | blob | history |
diff --git a/git-instaweb.sh b/git-instaweb.sh
index f5629e7439955666b1755177135ac7ac198bad54..41ff08f8e44b12bddcea257bc66f0b577e342ddd 100755 (executable)
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
start_httpd () {
httpd_only="`echo $httpd | cut -f1 -d' '`"
- if test "`expr index $httpd_only /`" -eq '1' || \
- which $httpd_only >/dev/null
+ if case "$httpd_only" in /*) : ;; *) which $httpd_only >/dev/null;; esac
then
$httpd $fqgitdir/gitweb/httpd.conf
else