diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-01-18 10:21:03 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-01-18 10:21:03 +0000 |
commit | f78ab819bff8e45b12edf2739120add04a8b1c84 (patch) | |
tree | 7012d15b309394f73ba084f8291f954460d6dcf2 /tool | |
parent | 45acdf4df45577ba1039f97990edaa1dcc8c8b96 (diff) |
common.mk: get rid of repeating same names
* common.mk (download-unicode-data): strip directory paths from
the target names, to get rid of repeating same file names.
* tool/downloader.rb: add -p option for prefix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rw-r--r-- | tool/downloader.rb | 6 |
1 files changed, 6 insertions, 0 deletions
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 |