1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* instruby.rb: use getopts.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eban 2002-12-27 16:28:10 +00:00
parent c40c0f726b
commit 3902064314

View file

@ -6,21 +6,16 @@ include Config
$:.unshift File.join(CONFIG["srcdir"], "lib")
require 'fileutils'
require 'shellwords'
require 'getopts'
File.umask(0)
while arg = ARGV.shift
case arg
when /^--make-flags=(.*)/
Shellwords.shellwords($1).grep(/^-[^-]*n/) {break $dryrun = true}
when "-n"
$dryrun = true
when /^-/
else
destdir ||= arg
end
getopts("n", "make:", "make-flags:")
$dryrun = $OPT["n"]
Shellwords.shellwords($OPT["make-flags"] || "").grep(/^-[^-]*n/) do
break $dryrun = true
end
destdir ||= ''
destdir = ARGV[0] || ''
include FileUtils::Verbose
include FileUtils::NoWrite if $dryrun