public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Eric Wong <normalperson@yhbt•net>
To: Johannes Schindelin <Johannes.Schindelin@gmx•de>
Cc: Junio C Hamano <junkio@cox•net>, git@vger•kernel.org
Subject: [PATCH] instaweb: fix unportable ';' usage in sed
Date: Sun, 2 Jul 2006 04:56:16 -0700	[thread overview]
Message-ID: <20060702115616.GA28291@soma> (raw)
In-Reply-To: <Pine.LNX.4.63.0607021109540.29667@wbgn013.biozentrum.uni-wuerzburg.de>

Hint taken from Johannes.  I've tested this with sed --posix on
my system with GNU sed and it works fine with and also without
it.  Further portability testing/review would be good.

Signed-off-by: Eric Wong <normalperson@yhbt•net>
---

 Johannes Schindelin <Johannes.Schindelin@gmx•de> wrote:
 > 
 > Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx•de>
 > ---
 > 	Re: What's in git.git
 > 
 > 	On Sun, 2 Jul 2006, Junio C Hamano wrote:
 > 
 > 	>  - instaweb by Eric Wong.
 > 
 > 	This breaks make on _all_ platforms I have.
 > 
 > 	First of all, it is _ugly_ (three invocations of sed, where one 
 > 	really is sufficient). Then, it uses the non-portable ';' 
 > 	operator, and then, the non-at-all-portable 'T'.
 > 
 > 	And worst: it is unnecessary.

 *Blushes*  Sorry about that, I've been meaning to brush up on my
 sed skills (coming from a Perl-heavy environment).

 git-instaweb.sh |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/git-instaweb.sh b/git-instaweb.sh
index 51067d9..69aef3c 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -194,9 +194,9 @@ EOF
 }
 
 script='
-s#^\(my\|our\) $projectroot =.*#\1 $projectroot = "'`dirname $fqgitdir`'";#;
-s#\(my\|our\) $gitbin =.*#\1 $gitbin = "'$GIT_EXEC_PATH'";#;
-s#\(my\|our\) $projects_list =.*#\1 $projects_list = $projectroot;#;
+s#^\(my\|our\) $projectroot =.*#\1 $projectroot = "'`dirname $fqgitdir`'";#
+s#\(my\|our\) $gitbin =.*#\1 $gitbin = "'$GIT_EXEC_PATH'";#
+s#\(my\|our\) $projects_list =.*#\1 $projects_list = $projectroot;#
 s#\(my\|our\) $git_temp =.*#\1 $git_temp = "'$fqgitdir/gitweb/tmp'";#'
 
 gitweb_cgi () {
-- 
1.4.1.rc2.gbc4f

  reply	other threads:[~2006-07-02 11:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-02  7:45 What's in git.git Junio C Hamano
2006-07-02  9:31 ` [PATCH] Makefile: replace ugly and unportable sed invocation Johannes Schindelin
2006-07-02 11:56   ` Eric Wong [this message]
2006-07-02 18:36   ` Junio C Hamano

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=20060702115616.GA28291@soma \
    --to=normalperson@yhbt$(echo .)net \
    --cc=Johannes.Schindelin@gmx$(echo .)de \
    --cc=git@vger$(echo .)kernel.org \
    --cc=junkio@cox$(echo .)net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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