Alexandre Julliard : patches: Create an intermediate directory level for patches on the website.
Alexandre Julliard
julliard at winehq.org
Fri Nov 10 09:14:03 CST 2017
Module: tools
Branch: master
Commit: a36a95cfab9a1f984e2649f69e4d4218273600d7
URL: http://source.winehq.org/git/tools.git/?a=commit;h=a36a95cfab9a1f984e2649f69e4d4218273600d7
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Nov 8 18:21:48 2017 +0100
patches: Create an intermediate directory level for patches on the website.
This avoids having hundreds of thousands of files in the same directory.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
patches/update | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/patches/update b/patches/update
index 87e640d..e4ede03 100755
--- a/patches/update
+++ b/patches/update
@@ -91,6 +91,7 @@ my $dir = $ARGV[0] || "$ENV{HOME}/patches";
my $dest = "/home/winehq/opt/source/patches";
my %patches;
my %messages;
+my %subdirs;
sub format_author($)
{
@@ -218,6 +219,7 @@ foreach my $file (readdir DIR)
$messages{$patch{"msgid"}} = \%patch;
}
$patches{$file} = \%patch;
+ if ($file =~ /^([0-9]+)[0-9]{4}$/) { $subdirs{$1} = 1; }
}
closedir DIR;
@@ -449,5 +451,9 @@ print INDEX $sorter;
print INDEX end_html;
close INDEX;
-!system "rsync", "-q", "-r", "--chmod=+r", "--exclude=OLD/", "$dir/", "$dest/data" or die "rsync failed: $?";
+foreach (keys %subdirs)
+{
+ !system "rsync", "-q", "-r", "--chmod=+r", "--include=$_*", "--exclude=*", "$dir/", "$dest/data/$_" or die "rsync failed: $?";
+}
+
rename "$dest/index.html.new", "$dest/index.html" or die "failed to update index.html";
More information about the wine-cvs
mailing list