Permalink
Browse files

add homebrew::usr_local

  • Loading branch information...
1 parent 34588c0 commit 91ea405e77fc1ffc28eb7464a797dfc21bc153f1 @bleything committed Dec 20, 2012
Showing with 29 additions and 0 deletions.
  1. +28 −0 cookbooks/homebrew/recipes/usr_local.rb
  2. +1 −0 roles/homebrew.rb
@@ -0,0 +1,28 @@
+#
+# Cookbook Name:: homebrew
+# Recipe:: usr_local
+#
+# Copyright 2012, Ben Bleything <ben@bleything.net>
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+execute "chown" do
+ command "sudo chown -R #{ENV['USER']} /usr/local"
+ action :nothing
+end
+
+execute "sudo mkdir -p /usr/local" do
+ not_if { File.exist? "/usr/local" }
+ notifies :run, 'execute[chown]', :immediately
+end
View
@@ -2,6 +2,7 @@
description "homebrew setup"
run_list %w{
+ recipe[homebrew::usr_local]
recipe[homebrew]
recipe[homebrew::environment]
recipe[homebrew::taps]

0 comments on commit 91ea405

Please sign in to comment.