From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Cc: Gurjeet Singh <singh.gurjeet@gmail.com>,
Eric Wong <normalperson@yhbt.net>
Subject: [PATCH 1/4] git-instaweb: Extract configuring web server into configure_httpd
Date: Thu, 23 Jun 2011 21:55:00 +0200 [thread overview]
Message-ID: <20110623195111.18265.77040.stgit@localhost.localdomain> (raw)
In-Reply-To: <20110623194624.18265.82482.stgit@localhost.localdomain>
This is preparatory work for making start/restart check that
git-instaweb set up correct configuration, and generate it if it is
missing.
Pure refactoring, no functional changes.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
As usual, you can check this change with
$ git blame -w --date=short -C -C HEAD^.. -- git-instaweb.sh |
grep -C 3 -e '^[^^]' | less -S
assuming that it is checked out (HEAD == this commit).
Thanks Junio for the tip!
Nb. it would be nice to have an option to 'git diff' which would
function like '-w' but ignore code movement...
git-instaweb.sh | 46 +++++++++++++++++++++++++---------------------
1 files changed, 25 insertions(+), 21 deletions(-)
diff --git a/git-instaweb.sh b/git-instaweb.sh
index 8bfa8a0..49bab7b 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -587,32 +587,36 @@ our \$projects_list = \$projectroot;
EOF
}
+configure_httpd() {
+ case "$httpd" in
+ *lighttpd*)
+ lighttpd_conf
+ ;;
+ *apache2*|*httpd*)
+ apache2_conf
+ ;;
+ webrick)
+ webrick_conf
+ ;;
+ *mongoose*)
+ mongoose_conf
+ ;;
+ *plackup*)
+ plackup_conf
+ ;;
+ *)
+ echo "Unknown httpd specified: $httpd"
+ exit 1
+ ;;
+ esac
+}
+
gitweb_conf
resolve_full_httpd
mkdir -p "$fqgitdir/gitweb/$httpd_only"
-case "$httpd" in
-*lighttpd*)
- lighttpd_conf
- ;;
-*apache2*|*httpd*)
- apache2_conf
- ;;
-webrick)
- webrick_conf
- ;;
-*mongoose*)
- mongoose_conf
- ;;
-*plackup*)
- plackup_conf
- ;;
-*)
- echo "Unknown httpd specified: $httpd"
- exit 1
- ;;
-esac
+configure_httpd
start_httpd
url=http://127.0.0.1:$port
next prev parent reply other threads:[~2011-06-23 19:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-23 1:06 Having some problem with instaweb Gurjeet Singh
2011-06-23 8:23 ` Jakub Narebski
2011-06-23 11:48 ` Gurjeet Singh
2011-06-23 19:29 ` Jakub Narebski
2011-06-23 19:50 ` [PATCH 0/4] git-instaweb: Improving handling of --start/--restart Jakub Narebski
2011-06-23 19:55 ` Jakub Narebski [this message]
2011-06-23 19:56 ` [PATCH 2/4] git-instaweb: Use $conf, not $fqgitdir/gitweb/httpd.conf Jakub Narebski
2011-06-23 20:59 ` [PATCH 3/4] git-instaweb: Move all actions at the end of script Jakub Narebski
2011-06-23 21:01 ` [PATCH 4/4] git-instaweb: Check that correct config file exists for (re)start Jakub Narebski
2011-06-28 3:22 ` [PATCH 0/4] git-instaweb: Improving handling of --start/--restart Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110623195111.18265.77040.stgit@localhost.localdomain \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=normalperson@yhbt.net \
--cc=singh.gurjeet@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).