summaryrefslogtreecommitdiff
path: root/tool/downloader.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-30 07:39:51 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-30 07:39:51 +0000
commit39713bd9277303d406ea43975b2f4d096a537dc4 (patch)
treede6d3f761ba6fd00097a061494ef4cc504dc5254 /tool/downloader.rb
parent40cc9231a9b37bfb22571a68fa0493e0ba532405 (diff)
common.mk: separate Unicode files directory
* common.mk: download Unicode files into separate directory for the version. * tool/downloader.rb (Downloader::Unicode.download): strip version directory. * tool/downloader.rb (Downloader.download): strip directory name if download directory is given. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/downloader.rb')
-rw-r--r--tool/downloader.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/tool/downloader.rb b/tool/downloader.rb
index 27c706d..3b39f45 100644
--- a/tool/downloader.rb
+++ b/tool/downloader.rb
@@ -17,7 +17,7 @@ class Downloader
class Unicode < self
def self.download(name, *rest)
- super("http://www.unicode.org/Public/7.0.0/ucd/#{name}", name, *rest)
+ super("http://www.unicode.org/Public/#{name}", name, *rest)
end
end
@@ -53,7 +53,7 @@ class Downloader
# download 'http://www.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt',
# 'UnicodeData.txt', 'enc/unicode/data'
def self.download(url, name, dir = nil, ims = true)
- file = dir ? File.join(dir, name) : name
+ file = dir ? File.join(dir, File.basename(name)) : name
return true if ims.nil? and File.exist?(file)
url = URI(url)
if $VERBOSE
@@ -124,7 +124,7 @@ if $0 == __FILE__
end
dl = Downloader.constants.find do |name|
ARGV[0].casecmp(name.to_s) == 0
- end
+ end unless ARGV.empty?
$VERBOSE = true
if dl
dl = Downloader.const_get(dl)