-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated Rakefile and .gitignore file
- Loading branch information
Dan Bode
committed
May 27, 2011
1 parent
845ba25
commit 35933a2
Showing
2 changed files
with
15 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
apt | ||
mysql | ||
gcc | ||
rabbitmq | ||
openstack | ||
git | ||
*.swp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,23 +3,26 @@ remote_modules = [ | |
'[email protected]:bodepd/puppetlabs-mysql.git' , | ||
'[email protected]:bodepd/puppetlabs-gcc.git', | ||
'[email protected]:bodepd/puppetlabs-git.git', | ||
'[email protected]:bodepd/puppetlabs-rabbitmq.git' | ||
'[email protected]:bodepd/puppetlabs-rabbitmq.git', | ||
'[email protected]:bodepd/puppet-openstack.git', | ||
] | ||
|
||
task :prepare do | ||
ignore_add = [] | ||
puts 'Downloading remote packages' | ||
puts 'Trying to download remote packages' | ||
ignore_file = File.join(File.dirname(__FILE__), '.gitignore') | ||
FileUtils.touch(ignore_file) unless File.exists?(ignore_file) | ||
File.open(ignore_file, 'w') do |fh| | ||
File.open(ignore_file, 'a') do |fh| | ||
remote_modules.each do |mymodule| | ||
puts `git clone #{mymodule}` | ||
if mymodule =~ /.*?\/(\w+-(\w+))\.git$/ | ||
unless File.exists?($2) | ||
puts `git clone #{mymodule}` | ||
puts "mv #{$1} #{$2}" | ||
FileUtils.mv($1, $2) | ||
end | ||
if File.read(ignore_file).grep(/#{mymodule}/).empty? | ||
fh.puts($2) | ||
end | ||
puts "mv #{$1} #{$2}" | ||
FileUtils.mv($1, $2) | ||
else | ||
raise ArgumentError, "Invalid module name #{mymodule}" | ||
end | ||
|