cURL / Mailing Lists / curl-library / Single Mail

curl-library

[testcurl.pl] Allow running ./tests/testcurl.pl from within git repo.

From: Ben Greear <greearb_at_candelatech.com>
Date: Sat, 27 Mar 2010 22:50:07 -0700

My first instinct was to run the test script within the checked out
repository. This small change to the script allows that to work as
expected.

Signed-off-by: Ben Greear <greearb_at_candelatech.com>

---
:100755 100755 b48c284... c55dcae... M	tests/testcurl.pl
 tests/testcurl.pl |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/tests/testcurl.pl b/tests/testcurl.pl
index b48c284..c55dcae 100755
--- a/tests/testcurl.pl
+++ b/tests/testcurl.pl
@@ -78,6 +78,10 @@ $fixed=0;
 # Determine if we're running from git or a canned copy of curl,
 # or if we got a specific target option or setup file option.
 $CURLDIR="curl";
+if (-f ".git/config") {
+  $CURLDIR = "./";
+}
+
 $git=1;
 $setupfile = 'setup';
 while ($ARGV[0]) {
-- 
1.6.2.5
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-03-28