diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-13 01:45:35 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-13 01:45:35 +0000 |
commit | ff10559d2b874990aee9704ed0e0eaa0cb151886 (patch) | |
tree | 168ed4670a496819351f3c4ea29af62971940c1e /tool/make-snapshot | |
parent | d540c478fe238229c02750ff8e6f0d15b0dda2ae (diff) | |
download | ruby-ff10559d2b874990aee9704ed0e0eaa0cb151886.tar.gz ruby-ff10559d2b874990aee9704ed0e0eaa0cb151886.tar.xz ruby-ff10559d2b874990aee9704ed0e0eaa0cb151886.zip |
* tool/make-snapshot: try to find exported directory.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/make-snapshot')
-rwxr-xr-x | tool/make-snapshot | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tool/make-snapshot b/tool/make-snapshot index 05c4dc2c7..e0f80c3ba 100755 --- a/tool/make-snapshot +++ b/tool/make-snapshot @@ -84,9 +84,11 @@ def package(rev, destdir) end end - v = "ruby-#{version}-#{tag}" - File.directory?(v) or File.rename "ruby", v - system("patch -d #{v} -p0 -i #{$patch_file}") if $patch_file + if !File.directory(v = "ruby") + v = Dir.glob("ruby-*").select(&File.method(:directory?)) + v.size == 1 or abort "not exported" + v = v[0] + end open("#{v}/revision.h", "wb") {|f| f.puts "#define RUBY_REVISION #{revision}"} version ||= (versionhdr = IO.read("#{v}/version.h"))[RUBY_VERSION_PATTERN, 1] version or return @@ -97,6 +99,9 @@ def package(rev, destdir) else tag = "r#{revision}" end + v = "ruby-#{version}-#{tag}" + File.directory?(v) or File.rename "ruby", v + system("patch -d #{v} -p0 -i #{$patch_file}") if $patch_file Dir.chdir(v) do File.open("cross.rb", "w") {|f| f.puts "CROSS_COMPILING=true"} unless File.exist?("configure") |