{"thread":{"id":"9845","subject":"[PATCH] Remove non-POSIX alternation in sed script in instaweb","startedAt":"2007-09-14T21:41:07Z","lastAt":"2007-09-14T21:41:07Z","messageCount":1,"participants":["Bryan Larsen"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"53057","messageId":"256f7ba80709141441l3bd2d3ecu9ce53809c686cec4@mail.gmail.com","threadId":"9845","inReplyTo":null,"subject":"[PATCH] Remove non-POSIX alternation in sed script in instaweb","fromName":"Bryan Larsen","fromEmail":"bryan@larsen.st","sentAt":"2007-09-14T21:41:07Z","receivedAt":"2007-09-14T21:41:07Z","isPatch":true,"sender":{"key":"bryan@larsen.st","avatar":"https://avatars.githubusercontent.com/u/32073?v=4"},"body":"git-instaweb.sh uses alternation in a sed script.  Unfortunately,\nthis is not POSIX compliant and does not work on some BSD's.  This\npatch removes the alternation via the simple expedient of doubling\nthe number of lines in the sed script.\n\nSigned-off-by: Bryan Larsen <bryan@larsen.st>\n---\n git-instaweb.sh |   12 ++++++++----\n 1 files changed, 8 insertions(+), 4 deletions(-)\n\ndiff --git a/git-instaweb.sh b/git-instaweb.sh\nindex b79c6b6..ce631a0 100755\n--- a/git-instaweb.sh\n+++ b/git-instaweb.sh\n@@ -207,10 +207,14 @@ EOF\n }\n\n script='\n-s#^\\(my\\|our\\) $projectroot =.*#\\1 $projectroot = \"'`dirname $fqgitdir`'\";#\n-s#\\(my\\|our\\) $gitbin =.*#\\1 $gitbin = \"'$GIT_EXEC_PATH'\";#\n-s#\\(my\\|our\\) $projects_list =.*#\\1 $projects_list = $projectroot;#\n-s#\\(my\\|our\\) $git_temp =.*#\\1 $git_temp = \"'$fqgitdir/gitweb/tmp'\";#'\n+s#^my $projectroot =.*#my $projectroot = \"'`dirname $fqgitdir`'\";#\n+s#^our $projectroot =.*#our $projectroot = \"'`dirname $fqgitdir`'\";#\n+s#my $gitbin =.*#my $gitbin = \"'$GIT_EXEC_PATH'\";#\n+s#our $gitbin =.*#our $gitbin = \"'$GIT_EXEC_PATH'\";#\n+s#my $projects_list =.*#my $projects_list = $projectroot;#\n+s#our $projects_list =.*#our $projects_list = $projectroot;#\n+s#my $git_temp =.*#my $git_temp = \"'$fqgitdir/gitweb/tmp'\";#\n+s#our $git_temp =.*#our $git_temp = \"'$fqgitdir/gitweb/tmp'\";#'\n\n gitweb_cgi () {\n        cat > \"$1.tmp\" <<\\EOFGITWEB\n-- \n1.5.3.1\n"}]}