git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] Remove non-POSIX alternation in sed script in instaweb
@ 2007-09-14 21:41 Bryan Larsen
  0 siblings, 0 replies; only message in thread
From: Bryan Larsen @ 2007-09-14 21:41 UTC (permalink / raw)
  To: git

git-instaweb.sh uses alternation in a sed script.  Unfortunately,
this is not POSIX compliant and does not work on some BSD's.  This
patch removes the alternation via the simple expedient of doubling
the number of lines in the sed script.

Signed-off-by: Bryan Larsen <bryan@larsen.st>
---
 git-instaweb.sh |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/git-instaweb.sh b/git-instaweb.sh
index b79c6b6..ce631a0 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -207,10 +207,14 @@ 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\) $git_temp =.*#\1 $git_temp = "'$fqgitdir/gitweb/tmp'";#'
+s#^my $projectroot =.*#my $projectroot = "'`dirname $fqgitdir`'";#
+s#^our $projectroot =.*#our $projectroot = "'`dirname $fqgitdir`'";#
+s#my $gitbin =.*#my $gitbin = "'$GIT_EXEC_PATH'";#
+s#our $gitbin =.*#our $gitbin = "'$GIT_EXEC_PATH'";#
+s#my $projects_list =.*#my $projects_list = $projectroot;#
+s#our $projects_list =.*#our $projects_list = $projectroot;#
+s#my $git_temp =.*#my $git_temp = "'$fqgitdir/gitweb/tmp'";#
+s#our $git_temp =.*#our $git_temp = "'$fqgitdir/gitweb/tmp'";#'

 gitweb_cgi () {
        cat > "$1.tmp" <<\EOFGITWEB
-- 
1.5.3.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-09-14 21:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-14 21:41 [PATCH] Remove non-POSIX alternation in sed script in instaweb Bryan Larsen

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).