You can now specify WEBKITSUPPORTLIBRARIESZIPDIR=C:\my\special\place
to tell update-webkit-support-libraries where it should find the
WebKitSupportLibrary.zip file you downloaded.
These scripts also now correctly interpret WEBKITLIBRARIESDIR as a
Windows-style path.
Reviewed by Sam.
* Scripts/update-webkit-auxiliary-libs: Also renamed $supportLibsURL
to $auxiliaryLibsURL and removed an irrelevant comment.
* Scripts/update-webkit-support-libs:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25725
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-09-25 Adam Roben <aroben@apple.com>
+
+ A couple of fixes/enhancements to update-webkit-*-libs
+
+ You can now specify WEBKITSUPPORTLIBRARIESZIPDIR=C:\my\special\place
+ to tell update-webkit-support-libraries where it should find the
+ WebKitSupportLibrary.zip file you downloaded.
+
+ These scripts also now correctly interpret WEBKITLIBRARIESDIR as a
+ Windows-style path.
+
+ Reviewed by Sam.
+
+ * Scripts/update-webkit-auxiliary-libs: Also renamed $supportLibsURL
+ to $auxiliaryLibsURL and removed an irrelevant comment.
+ * Scripts/update-webkit-support-libs:
+
2007-09-25 Adam Treat <treat@kde.org>
Reviewed by Simon and Lars.
my $sourceDir = sourceDir();
my $file = "WebKitAuxiliaryLibrary";
my $zipFile = "$file.zip";
-my $supportLibsURL = "http://developer.apple.com/opensource/internet/$zipFile"; # UPDATE ME!!
-my $webkitLibrariesDir = File::Spec->rel2abs($ENV{'WEBKITLIBRARIESDIR'} || "$sourceDir/WebKitLibraries/win");
+my $auxiliaryLibsURL = "http://developer.apple.com/opensource/internet/$zipFile";
+my $webkitLibrariesDir = toUnixPath($ENV{'WEBKITLIBRARIESDIR'}) || "$sourceDir/WebKitLibraries/win";
my $tmpDir = File::Spec->rel2abs(File::Temp::tempdir("webkitlibsXXXXXXX", TMPDIR => 1, CLEANUP => 1));
print "Checking Last-Modified date of $zipFile...\n";
-my $result = system "curl -s -I $supportLibsURL | grep Last-Modified > \"$tmpDir/$file.headers\"";
+my $result = system "curl -s -I $auxiliaryLibsURL | grep Last-Modified > \"$tmpDir/$file.headers\"";
print STDERR "Couldn't check Last-Modified date of new $zipFile.\n" if $result;
if (!$result && open NEW, "$tmpDir/$file.headers") {
}
print "Downloading $zipFile...\n\n";
-$result = system "curl -o \"$tmpDir/$zipFile\" $supportLibsURL";
+$result = system "curl -o \"$tmpDir/$zipFile\" $auxiliaryLibsURL";
die "Couldn't download $zipFile!" if $result;
$result = system "unzip", "-q", "-d", $tmpDir, "$tmpDir/$zipFile";
print STDERR "Couldn't move $file.headers to $webkitLibrariesDir" . ".\n" if $result;
print "The $file has been sucessfully installed in\n $webkitLibrariesDir\n";
+exit;
+
+sub toUnixPath
+{
+ my $path = shift;
+ return unless $path;
+ chomp($path = `cygpath -u '$path'`);
+ return $path;
+}
my $sourceDir = sourceDir();
my $file = "WebKitSupportLibrary";
my $zipFile = "$file.zip";
-my $pathToZip = "$sourceDir/$zipFile";
-my $webkitLibrariesDir = File::Spec->rel2abs($ENV{'WEBKITLIBRARIESDIR'} || "$sourceDir/WebKitLibraries/win");
+my $zipDirectory = toUnixPath($ENV{'WEBKITSUPPORTLIBRARIESZIPDIR'}) || $sourceDir;
+my $pathToZip = File::Spec->catfile($zipDirectory, $zipFile);
+my $webkitLibrariesDir = toUnixPath($ENV{'WEBKITLIBRARIESDIR'}) || "$sourceDir/WebKitLibraries/win";
my $tmpDir = File::Spec->rel2abs(File::Temp::tempdir("webkitlibsXXXXXXX", TMPDIR => 1, CLEANUP => 1));
# Make sure the file zipfile exists before doing anything.
print STDERR "Couldn't move $file.modified to $webkitLibrariesDir" . ".\n" if $result;
print "The $file has been sucessfully installed in\n $webkitLibrariesDir\n";
+exit;
+
+sub toUnixPath
+{
+ my $path = shift;
+ return unless $path;
+ chomp($path = `cygpath -u '$path'`);
+ return $path;
+}