diff --git a/Rakefile b/Rakefile index c4935bc6..0f870aee 100644 --- a/Rakefile +++ b/Rakefile @@ -74,7 +74,11 @@ task :clean do sh "rm -rf pkg" sh "git clean -df" sh "cd #{V8_Source} && git checkout -f && git clean -dxf" - sh "cd #{GYP_Source} && git checkout -f && git clean -dxf" + if Dir.chdir GYP_Source + sh "git checkout -f" + puts "git clean -dxf" + `git clean -dxf` + end end task :devkit do diff --git a/ext/libv8/checkout.rb b/ext/libv8/checkout.rb index 4ddd340a..b7102a39 100644 --- a/ext/libv8/checkout.rb +++ b/ext/libv8/checkout.rb @@ -31,7 +31,7 @@ def checkout! # --git-dir is needed for older versions of git and git-svn `git --git-dir=../../.git/modules/vendor/gyp/ svn init #{GYP_SVN} -Ttrunk` `git config --replace-all svn-remote.svn.fetch trunk:refs/remotes/origin/master` - svn_rev = `git --git-dir=../../.git/modules/vendor/gyp/ svn find-rev r#{rev} | tail -n 1` + svn_rev = `git --git-dir=../../.git/modules/vendor/gyp/ svn find-rev r#{rev} | tail -n 1`.chomp `git checkout #{svn_rev} -f` end end @@ -43,7 +43,7 @@ def git?(dir) def check_git_svn! # msysgit provides git svn return if RUBY_PLATFORM =~ /mingw/ - + unless system 'git help svn 2>&1 > /dev/null' fail "git-svn not installed!\nPlease install git-svn." end