summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common.mk5
-rw-r--r--tool/downloader.rb6
2 files changed, 8 insertions, 3 deletions
diff --git a/common.mk b/common.mk
index cf9d97b68f..1253e4415f 100644
--- a/common.mk
+++ b/common.mk
@@ -1017,10 +1017,9 @@ download-unicode-data: ./.unicode-$(UNICODE_VERSION).time
$(Q) $(MAKEDIRS) "$(srcdir)/enc/unicode/data/$(UNICODE_VERSION)"
$(Q) $(BASERUBY) -C "$(srcdir)" tool/downloader.rb \
-d enc/unicode/data/$(UNICODE_VERSION) \
+ -p $(UNICODE_VERSION)/ucd \
-e $(ALWAYS_UPDATE_UNICODE:yes=-a) unicode \
- $(UNICODE_VERSION)/ucd/UnicodeData.txt \
- $(UNICODE_VERSION)/ucd/CompositionExclusions.txt \
- $(UNICODE_VERSION)/ucd/NormalizationTest.txt
+ $(UNICODE_FILES)
@exit > $@
$(srcdir)/$(HAVE_BASERUBY:yes=lib/unicode_normalize/tables.rb): \
diff --git a/tool/downloader.rb b/tool/downloader.rb
index 40a207f14e..e1d648e29a 100644
--- a/tool/downloader.rb
+++ b/tool/downloader.rb
@@ -186,6 +186,11 @@ if $0 == __FILE__
when '-d'
destdir = ARGV[1]
ARGV.shift
+ when '-p'
+ # strip directory names from the name to download, and add the
+ # prefix instead.
+ prefix = ARGV[1]
+ ARGV.shift
when '-e'
ims = nil
when '-a'
@@ -205,6 +210,7 @@ if $0 == __FILE__
dl = Downloader.const_get(dl)
ARGV.shift
ARGV.each do |name|
+ name = "#{prefix}/#{File.basename(name)}" if prefix
dl.download(name, destdir, ims)
end
else