Browse files

give macvim and emacs their own recipes

  • Loading branch information...
1 parent aa3c86a commit a1fcc3d675ed0e1b8b856841239120c2e7d5a2e6 @bleything committed May 4, 2012
View
8 config/example.json
@@ -6,7 +6,9 @@
"recipe[apps::alfred]",
"recipe[apps::chrome]",
"recipe[apps::dropbox]",
+ "recipe[apps::emacs]",
"recipe[apps::grandperspective]",
+ "recipe[apps::macvim]",
"recipe[apps::virtualbox]",
"recipe[apps::vlc]",
@@ -34,15 +36,9 @@
"autoconf",
"automake",
"dos2unix",
- {
- "package": "emacs",
- "head": true,
- "args": "--cocoa --srgb --use-git-head"
- },
"git",
"gnupg",
"hub",
- "macvim",
"ispell",
"md5sha1sum",
"p7zip",
View
1 cookbooks/apps/attributes/emacs.rb
@@ -0,0 +1 @@
+default.dotemacs_repo = nil
View
1 cookbooks/apps/attributes/macvim.rb
@@ -0,0 +1 @@
+default.dotvim_repo = nil
View
35 cookbooks/apps/recipes/emacs.rb
@@ -0,0 +1,35 @@
+#
+# Cookbook Name:: apps
+# Recipe:: emacs
+# Author:: Ben Bleything <ben.bleything@livingsocial.com>
+#
+# Copyright 2012, LivingSocial
+#
+# 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.
+#
+
+include_recipe 'homebrew'
+
+execute "install emacs" do
+ command "brew install emacs --HEAD --use-git-head --cocoa --srgb"
+ not_if { ::File.directory? "/usr/local/Cellar/emacs" }
+end
+
+git "#{ENV['HOME']}/.emacs.d" do
+ repository node.dotemacs_repo
+ only_if { node.dotemacs_repo }
+end
+
+link "/Applications/Emacs.app" do
+ to "/usr/local/Cellar/emacs/HEAD/Emacs.app"
+end
View
32 cookbooks/apps/recipes/vim.rb
@@ -0,0 +1,32 @@
+#
+# Cookbook Name:: apps
+# Recipe:: macvim
+# Author:: Ben Bleything <ben.bleything@livingsocial.com>
+#
+# Copyright 2012, LivingSocial
+#
+# 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.
+#
+
+include_recipe 'homebrew'
+package "macvim"
+
+git "#{ENV['HOME']}/.vim" do
+ repository node.dotvim_repo
+ only_if { node.dotvim_repo }
+end
+
+macvim_prefix = `brew --prefix macvim`.strip
+link "/Applications/MacVim.app" do
+ to "#{macvim_prefix}/MacVim.app"
+end

0 comments on commit a1fcc3d

Please sign in to comment.