penchant/template/script/initialize-environment

22 lines
417 B
Plaintext
Raw Normal View History

2011-07-14 19:50:51 +00:00
#!/usr/bin/env ruby
pwd = Dir.pwd
Dir.chdir '..' do
File.readlines(File.join(pwd, 'Gemfile.erb')).find_all { |line| line[':git'] }.each do |line|
repo = line[%r{:git => (['"])(.*)\1}, 2]
puts "Installing #{repo}"
system %{git clone #{repo}}
end
end
puts "Bundling for local environment"
system %{script/gemfile local}
puts "Installing git hooks"
system %{script/install-git-hooks}
puts "Done!"