git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/3] t/gitweb-lib.sh: Use GIT_BUILD_DIR

From
Jakub Narebski <jnareb@gmail.com>
Date
Sep 12, 2010, 09:41 UTC
Message-ID
<1284284466-14506-2-git-send-email-jnareb@gmail.com>
In-Reply-To
<1284284466-14506-1-git-send-email-jnareb@gmail.com>

Use "$GIT_BUILD_DIR" instead of "$TEST_DIRECTORY/.." (both defined in t/test-lib.sh) in t/gitweb-lib.sh. It better describes the intent.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
I think it makes gitweb_init() and gitweb_install() more clear.
 t/gitweb-lib.sh |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
 mode change 100644 => 100755 t/gitweb-lib.sh
diff --git a/t/gitweb-lib.sh b/t/gitweb-lib.sh
old mode 100644
new mode 100755
index 81ef2a0..8fad236
--- a/t/gitweb-lib.sh
+++ b/t/gitweb-lib.sh
@@ -19,9 +19,9 @@ our \$site_name = '[localhost]';
 our \$site_header = '';
 our \$site_footer = '';
 our \$home_text = 'indextext.html';
-our @stylesheets = ('file:///$TEST_DIRECTORY/../gitweb/static/gitweb.css');
-our \$logo = 'file:///$TEST_DIRECTORY/../gitweb/static/git-logo.png';
-our \$favicon = 'file:///$TEST_DIRECTORY/../gitweb/static/git-favicon.png';
+our @stylesheets = ('file:///$GIT_BUILD_DIR/gitweb/static/gitweb.css');
+our \$logo = 'file:///$GIT_BUILD_DIR/gitweb/static/git-logo.png';
+our \$favicon = 'file:///$GIT_BUILD_DIR/gitweb/static/git-favicon.png';
 our \$projects_list = '';
 our \$export_ok = '';
 our \$strict_export = '';
@@ -38,7 +38,7 @@ gitweb_run () {
 	GATEWAY_INTERFACE='CGI/1.1'
 	HTTP_ACCEPT='*/*'
 	REQUEST_METHOD='GET'
-	SCRIPT_NAME="$TEST_DIRECTORY/../gitweb/gitweb.perl"
+	SCRIPT_NAME="$GIT_BUILD_DIR/gitweb/gitweb.perl"
 	QUERY_STRING=""$1""
 	PATH_INFO=""$2""
 	export GATEWAY_INTERFACE HTTP_ACCEPT REQUEST_METHOD \
-- 
1.7.2.1
Previous: Jakub NarebskiNext: Jakub Narebski
Message 2 of 8 in “t/gitweb-lib.sh improvements”
  1. 0/3 t/gitweb-lib.sh improvementsJakub Narebski, Sep 12, 2010
  2. 1/3 t/gitweb-lib.sh: Use GIT_BUILD_DIRJakub Narebski, Sep 12, 2010
  3. 2/3 t/gitweb-lib.sh: Use tabs for indent consistentlyJakub Narebski, Sep 12, 2010
  4. 3/3 t/gitweb-lib.sh: Add support for GITWEB_TEST_INSTALLEDJakub Narebski, Sep 12, 2010
  5. Ævar Arnfjörð BjarmasonSep 12, 2010
  6. Junio C HamanoSep 12, 2010
  7. Jakub NarebskiSep 12, 2010
  8. 3/3 t/gitweb-lib.sh: Add support for GITWEB_TEST_INSTALLEDJakub Narebski, Sep 16, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.