Changeset 225704 in webkit


Ignore:
Timestamp:
Dec 8, 2017 2:44:47 PM (6 years ago)
Author:
Michael Catanzaro
Message:

Don't require perl(File::Copy::Recursive)
https://bugs.webkit.org/show_bug.cgi?id=180479

Reviewed by Konstantin Tokarev.

If File::Copy::Recursive is not installed, there is currently a Darwin
fallback to the ditto command. That doesn't exist on Linux, but we can
emulate it by running 'cp -R' on everything in the source directory.
This should probably work everywhere except Windows.

  • Scripts/copy-user-interface-resources.pl:

(ditto):

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r225663 r225704  
     12017-12-08  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        Don't require perl(File::Copy::Recursive)
     4        https://bugs.webkit.org/show_bug.cgi?id=180479
     5
     6        Reviewed by Konstantin Tokarev.
     7
     8        If File::Copy::Recursive is not installed, there is currently a Darwin
     9        fallback to the ditto command. That doesn't exist on Linux, but we can
     10        emulate it by running 'cp -R' on everything in the source directory.
     11        This should probably work everywhere except Windows.
     12
     13        * Scripts/copy-user-interface-resources.pl:
     14        (ditto):
     15
    1162017-12-07  Eric Carlson  <eric.carlson@apple.com>
    217
  • trunk/Source/WebInspectorUI/Scripts/copy-user-interface-resources.pl

    r224877 r225704  
    4747    } elsif ($^O eq 'darwin') {
    4848        system('ditto', $source, $destination);
     49    } elsif ($^O ne 'MSWin32') {
     50        # Ditto copies the *contents* of the source directory, not the directory itself.
     51        opendir(my $dh, $source) or die "Can't open $source: $!";
     52        while (readdir $dh) {
     53            if ($_ ne '..' and $_ ne '.') {
     54                system('cp', '-R', "${source}/$_", $destination) or die "Failed to copy ${source}/$_ to $destination: $!";
     55            }
     56        }
     57        closedir $dh;
    4958    } else {
    5059        die "Please install the PEP module File::Copy::Recursive";
Note: See TracChangeset for help on using the changeset viewer.