4 desc "Synchronize mspec with another checkout"
6 unless dir = ENV['DIR']
7 raise "Use DIR= to specify a checkout of mspec"
10 unless File.directory?(dir)
11 raise "#{dir} isn't an mspec checkout. Use 'cd ~/git; git clone git://github.com/brixen/mspec.git'"
14 rsync dir + "/*", "mspec"
16 version = Dir.chdir(ENV['DIR']) { `git log --pretty=oneline -1`[0..7] }
18 sh "git commit -m 'Updated MSpec source to #{version}.' mspec"