mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
tool/downloader.rb: fix for old ruby on old CentOS
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c47b523246
commit
a05330f4b9
1 changed files with 3 additions and 3 deletions
|
@ -22,7 +22,7 @@ class Downloader
|
|||
end
|
||||
|
||||
def self.mode_for(data)
|
||||
data.start_with?("#!") ? 0755 : 0644
|
||||
/\A#!/ =~ data ? 0755 : 0644
|
||||
end
|
||||
|
||||
def self.http_options(file, since)
|
||||
|
@ -97,15 +97,15 @@ if $0 == __FILE__
|
|||
case ARGV[0]
|
||||
when '-d'
|
||||
destdir = ARGV[1]
|
||||
ARGV.shift(2)
|
||||
ARGV.shift
|
||||
when '-e'
|
||||
ims = nil
|
||||
ARGV.shift
|
||||
when /\A-/
|
||||
abort "#{$0}: unknown option #{ARGV[0]}"
|
||||
else
|
||||
break
|
||||
end
|
||||
ARGV.shift
|
||||
end
|
||||
dl = Downloader.constants.find do |name|
|
||||
ARGV[0].casecmp(name.to_s) == 0
|
||||
|
|
Loading…
Reference in a new issue