]> granicus.if.org Git - curl/commitdiff
David Byron's fix that makes this script use 'cygpath' instead of 'pwd' if
authorDaniel Stenberg <daniel@haxx.se>
Tue, 12 Aug 2003 21:18:39 +0000 (21:18 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 12 Aug 2003 21:18:39 +0000 (21:18 +0000)
this runs on windows, to find out the current working directory.

tests/runtests.pl

index 4af8665f61f5ab42e940a22ba2029eb1699dca48..450d49aabe9ee0c49918f4c935154bf651007e22 100755 (executable)
@@ -452,6 +452,22 @@ sub checkcurl {
 
             $curl =~ s/^(.*)(libcurl.*)/$1/g;
             $libcurl = $2;
+
+           if ($curl =~ /win32/)
+           {
+               # Native Windows builds don't understand the
+               # output of cygwin's pwd.  It will be
+               # something like /cygdrive/c/<some path>.
+               #
+               # Use the cygpath utility to convert the
+               # working directory to a Windows friendly
+               # path.  The -m option converts to use drive
+               # letter:, but it uses / instead \.  Forward
+               # slashes (/) are easier for us.  We don't
+               # have to escape them to get them to curl
+               # through a shell.
+               chomp($pwd = `cygpath -m $pwd`);
+           }
         }
         elsif($_ =~ /^Protocols: (.*)/i) {
             # these are the supported protocols, we don't use this knowledge