summaryrefslogtreecommitdiff
path: root/mkconfig.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-03-20 10:44:31 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-03-20 10:44:31 +0000
commit879a5e46a5f3ec87714514d38727416a4a33f012 (patch)
tree095b505a62050ad6864db54d334f456eae07f65a /mkconfig.rb
parentf596cfc1d980688a4dbf98378d5ff8d9091cfa2e (diff)
* mkconfig.rb: don't touch rbconfig.rb if there is a trouble.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mkconfig.rb')
-rw-r--r--mkconfig.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/mkconfig.rb b/mkconfig.rb
index 5eb0b18..d558583 100644
--- a/mkconfig.rb
+++ b/mkconfig.rb
@@ -7,7 +7,8 @@ srcdir = $srcdir if $srcdir
File.makedirs(File.dirname(rbconfig_rb), true)
version = RUBY_VERSION
-config = open(rbconfig_rb, "w")
+rbconfig_rb_tmp = rbconfig_rb + '.tmp'
+config = open(rbconfig_rb_tmp, "w")
$stdout.reopen(config)
fast = {'prefix'=>TRUE, 'ruby_install_name'=>TRUE, 'INSTALL'=>TRUE, 'EXEEXT'=>TRUE}
@@ -111,5 +112,6 @@ print <<EOS
end
EOS
config.close
+File.rename(rbconfig_rb_tmp, rbconfig_rb)
# vi:set sw=2: