Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 25 lines (19 sloc) 0.684 kB
5b704cb @brixen Added task to sync winpthreads.
brixen authored
1 # -*- ruby -*-
2
3 require 'rakelib/git'
4
5 namespace :winpthreads do
eff4aa4 @brixen Changed references from vm/external_libs to vendor.
brixen authored
6 desc "Synchronize vendor/winpthreads with current clone"
5b704cb @brixen Added task to sync winpthreads.
brixen authored
7 task :sync do
8 unless src_dir = ENV['DIR']
9 raise "Use DIR= to specify a clone of winpthreads"
10 end
eff4aa4 @brixen Changed references from vm/external_libs to vendor.
brixen authored
11 dest_dir = "vendor/winpthreads"
5b704cb @brixen Added task to sync winpthreads.
brixen authored
12
13 unless is_git_project src_dir, "winpthreads.git"
14 raise "#{src_dir} is not a winpthreads clone. Clone from 'git://github.com/brixen/winpthreads.git'"
15 end
16
17 rm_rf dest_dir
18 rsync "#{src_dir}/*", dest_dir
19
20 version = Dir.chdir(src_dir) { `git log --pretty=oneline -1`[0..7] }
21 sh "git add -f #{dest_dir}"
22 sh "git commit -m 'Updated winpthreads to #{version}.' #{dest_dir}"
23 end
24 end
Something went wrong with that request. Please try again.