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
|
end
|
||||||
|
|
||||||
def self.mode_for(data)
|
def self.mode_for(data)
|
||||||
data.start_with?("#!") ? 0755 : 0644
|
/\A#!/ =~ data ? 0755 : 0644
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.http_options(file, since)
|
def self.http_options(file, since)
|
||||||
|
@ -97,15 +97,15 @@ if $0 == __FILE__
|
||||||
case ARGV[0]
|
case ARGV[0]
|
||||||
when '-d'
|
when '-d'
|
||||||
destdir = ARGV[1]
|
destdir = ARGV[1]
|
||||||
ARGV.shift(2)
|
ARGV.shift
|
||||||
when '-e'
|
when '-e'
|
||||||
ims = nil
|
ims = nil
|
||||||
ARGV.shift
|
|
||||||
when /\A-/
|
when /\A-/
|
||||||
abort "#{$0}: unknown option #{ARGV[0]}"
|
abort "#{$0}: unknown option #{ARGV[0]}"
|
||||||
else
|
else
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
ARGV.shift
|
||||||
end
|
end
|
||||||
dl = Downloader.constants.find do |name|
|
dl = Downloader.constants.find do |name|
|
||||||
ARGV[0].casecmp(name.to_s) == 0
|
ARGV[0].casecmp(name.to_s) == 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue