Skip to content

Commit

Permalink
shuffle runlist and fix homebrew bullshit
Browse files Browse the repository at this point in the history
  • Loading branch information
atmos committed Sep 19, 2011
1 parent a5f7de3 commit a5aaf0c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions Rakefile
Expand Up @@ -10,6 +10,7 @@
# Smeagol defaults to latest homebrew by default
ENV['CINDERELLA_RELEASE'] ||= 'origin/master'

desc "Package up a set of chef recipes for the cinderella client"
task :package do
system("tar czf ../ciderapp.org/cider.tgz --exclude certificates --exclude config --exclude .git --exclude roles --exclude site-cookbooks .")
end
Expand Down Expand Up @@ -62,6 +63,7 @@ begin
end

namespace :smeagol do
desc "Run the smeagol chef recipes with the run_list.json in config/"
task :install do |t, args|
system("chef-solo -j config/run_list.json -c config/solo.rb")
end
Expand Down
4 changes: 2 additions & 2 deletions config/run_list.json
@@ -1,7 +1,7 @@
{
"recipes": [
"homebrew", "homebrew::dbs", "homebrew::misc", "git",
"homebrew", "homebrew::misc", "git",
"mvim", "mvim::cli", "homebrew::dbs",
"ruby", "ruby::rbenv", "python", "erlang", "node",
"mvim", "mvim::cli"
]
}
2 changes: 1 addition & 1 deletion cookbooks/homebrew/providers/homebrew.rb
Expand Up @@ -20,7 +20,7 @@ def load_current_resource
end

def install_package(name, version)
run_brew_command("/usr/bin/env HOMEBREW_TEMP=#{PREFIX}/tmp #{HOMEBREW} install #{name}")
run_brew_command("if [ brew info #{name} | grep -q \"Not installed\" -eq 0 ]; then /usr/bin/env HOMEBREW_TEMP=#{PREFIX}/tmp #{HOMEBREW} install #{name}; fi")
end

def remove_package(name, version)
Expand Down
6 changes: 3 additions & 3 deletions cookbooks/homebrew/recipes/default.rb
Expand Up @@ -3,7 +3,7 @@
# Recipe:: homebrew
#

HOMEBREW_DEFAULT_SHA1 = '97b62b8b3f1c8973cf8a2575bfc98706ccbbde39'
HOMEBREW_DEFAULT_SHA1 = '05209f7c75f693edf23d992b5a00409520d36de2'

root = File.expand_path(File.join(File.dirname(__FILE__), ".."))

Expand Down Expand Up @@ -71,7 +71,7 @@
if [ ! -d ./.git ]; then
git init
git remote add origin git://github.com/mxcl/homebrew.git
git fetch origin
git fetch -q origin
git reset --hard origin/master
fi
EOS
Expand All @@ -82,7 +82,7 @@
code <<-EOS
source ~/.cinderella.profile
PATH=#{ENV['HOME']}/Developer/bin:$PATH; export PATH
(cd ~/Developer && git fetch origin && git reset --hard #{ENV['CINDERELLA_RELEASE'] || HOMEBREW_DEFAULT_SHA1}) >> ~/.cinderella/brew.log 2>&1
(cd ~/Developer && git fetch -q origin && git reset --hard #{ENV['CINDERELLA_RELEASE'] || HOMEBREW_DEFAULT_SHA1}) >> ~/.cinderella/brew.log 2>&1
EOS
end

Expand Down

0 comments on commit a5aaf0c

Please sign in to comment.