Permalink
Browse files

Fix sync_ruby to work properly with our forked branch names (which ar…

…e not dotted) and handle running from another directory.
  • Loading branch information...
1 parent c3329e4 commit d551d0fd16d40da72b55bebe7fc24ee510d052b4 @headius headius committed Jun 4, 2010
Showing with 3 additions and 2 deletions.
  1. +3 −2 tool/sync_ruby
View
@@ -15,6 +15,7 @@ class Sync
include FileUtils
def initialize(version, source, target)
+ @named_version = version
@version = format_version(version)
@source = source
@target = target
@@ -29,7 +30,7 @@ class Sync
end
def sync_stdlib
- load "globals_#{@version}.rb"
+ load File.dirname(__FILE__) + "/globals_#{@named_version}.rb"
for file in STDLIB_FILES
cp_r "#{@source}/lib/#{file}", "#{@target}/lib/ruby/#{@version}", :verbose => true
@@ -57,7 +58,7 @@ class Sync
def checkout(source, version)
cd(source) do
- branch = "jruby-ruby_#{version}"
+ branch = "jruby-ruby_#{@named_version}"
if (branches = `git branch | sed 's/[\*\s]*//'`).split("\n").include? branch
`git checkout #{branch}`

0 comments on commit d551d0f

Please sign in to comment.