Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 10 commits
  • 12 files changed
  • 0 commit comments
  • 5 contributors
Commits on Nov 08, 2011
@mikem Add CTRL+O & CTRL+S support to bash 9671f92
Commits on Nov 09, 2011
Brian Cunnie & Matthew Kocher Put /usr/local/bin first in path so that we execute the postgres
executables it gets the right ones (in /usr/local/bin) rather than
the [wrong] [stock] ones that Apple includes.  This has been the
source of many problems.
40ec225
Brian Cunnie & Matthew Kocher Added fix for compiling macvim under xcode 4.2 c1252ee
Commits on Nov 10, 2011
Brian Cunnie & Matthew Kocher Merge remote-tracking branch 'mikem/add-ctrl-o-ctrl-s' ad08ff7
Brian Cunnie & Matthew Kocher removed ctrl-s override 887429c
Steve Ellis Install textmate's application support directory as WS_USER instead o…
…f as root so that PlugIns can install
10f235c
Commits on Nov 11, 2011
Brian Cunnie Rather than just /saying/ we're passing the args, we need to pass the…
… args
3209bef
Commits on Nov 16, 2011
@pivotalcommon pivotalcommon Merge pull request #20 from se3000/master
Install textmate's application support directory as WS_USER instead of as root so that PlugIns can install
756f92f
Brian Cunnie & Matthew Kocher Adding metadata cbd8f46
Brian Cunnie & Matthew Kocher Merge branch 'master' of github.com:pivotal/pivotal_workstation 4b13f98
View
8 libraries/brew.rb
@@ -1,11 +1,11 @@
class Chef::Recipe
- def brew_install(package, force=false)
+ def brew_install(package, opts={})
include_recipe "pivotal_workstation::homebrew"
- execute "brew install #{package}" do
+ execute "brew install #{package} #{opts[:brew_args]}" do
user WS_USER
- command "brew install #{package}"
- not_if { force ? false : system("brew list #{package}") }
+ command "brew install #{package} #{opts[:brew_args]}"
+ not_if "brew list | grep '^#{package}$'"
end
end
View
7 metadata.rb
@@ -0,0 +1,7 @@
+maintainer "Pivotal Labs"
+maintainer_email "accounts@pivotallabs.com"
+license "MIT"
+description "Configure frequently-used tools for an OSX workstation"
+long_description IO.read(File.join(File.dirname(__FILE__), 'README.markdown'))
+version "1.0.0"
+supports "mac_os_x"
View
21 recipes/bash_path_order.rb
@@ -1,13 +1,12 @@
-run_unless_marker_file_exists("bash_path_order") do
- ruby_block "put /usr/local/bin first in path" do
- block do
- new_contents = ""
- File.open("/etc/paths", "r") do |file|
- new_contents = "/usr/local/bin\n"+file.read.gsub("/usr/local/bin\n", "")
- end
- File.open("/etc/paths", "w") do |file|
- file.write(new_contents)
- end
+ruby_block "put /usr/local/bin first in path" do
+ block do
+ ENV['PATH']="/usr/local/bin:#{ENV['PATH']}"
+ new_contents = ""
+ File.open("/etc/paths", "r") do |file|
+ new_contents = "/usr/local/bin\n"+file.read.gsub("/usr/local/bin\n", "")
+ end
+ File.open("/etc/paths", "w") do |file|
+ file.write(new_contents)
end
end
-end
+end
View
1 recipes/bash_profile-ctrl-o.rb
@@ -0,0 +1 @@
+bash_profile_include("ctrl-o")
View
1 recipes/bash_profile-ctrl-s.rb
@@ -0,0 +1 @@
+bash_profile_include("ctrl-s")
View
3 recipes/homebrew.rb
@@ -1,4 +1,5 @@
include_recipe "pivotal_workstation::user_owns_usr_local"
+include_recipe "pivotal_workstation::bash_path_order"
homebrew_git_revision_hash = version_string_for("homebrew")
@@ -34,4 +35,4 @@
directory "/usr/local/sbin" do
owner WS_USER
-end
+end
View
3 recipes/meta_osx_base.rb
@@ -6,9 +6,10 @@
include_recipe "pivotal_workstation::firefox"
include_recipe "pivotal_workstation::bash_profile-better_history"
include_recipe "pivotal_workstation::bash_profile-ps1"
+include_recipe "pivotal_workstation::bash_profile-ctrl-o"
include_recipe "pivotal_workstation::inputrc"
include_recipe "pivotal_workstation::locate_on"
include_recipe "pivotal_workstation::dropbox"
include_recipe "pivotal_workstation::chrome"
include_recipe "pivotal_workstation::mouse_locator"
-include_recipe "pivotal_workstation::defaults_fast_key_repeat_rate"
+include_recipe "pivotal_workstation::defaults_fast_key_repeat_rate"
View
31 recipes/postgres.rb
@@ -22,20 +22,6 @@
brew_remove "postgresql"
brew_install "postgresql"
- ruby_block "rename Apple's stock postgres commands to avoid confusion" do
- block do
- new_dir="/usr/bin/postgres-orig"
- if ! ( File.exists?(new_dir) && File.directory?(new_dir) )
- Dir.mkdir(new_dir)
- end
- ["clusterdb", "createdb", "createlang", "createuser", "dropdb", "droplang", "dropuser", "ecpg", "initdb", "oid2name", "pg_archivecleanup", "pg_config", "pg_controldata", "pg_ctl", "pg_dump", "pg_dumpall", "pg_resetxlog", "pg_restore", "pg_standby", "pg_upgrade", "pgbench", "postgres", "postmaster", "psql", "reindexdb", "vacuumdb", "vacuumlo"].each do |pg_cmd|
- if File.exists?("/usr/bin/#{pg_cmd}")
- File.rename("/usr/bin/#{pg_cmd}","/usr/bin/postgres-orig/#{pg_cmd}")
- end
- end
- end
- end
-
execute "create the database" do
command %'initdb -U #{WS_USER} --encoding=utf8 --locale=en_US /usr/local/var/postgres'
user WS_USER
@@ -88,23 +74,6 @@
end
-# An Apple Upgrade (e.g. 10.7.2) may re-introduce the executables we
-# so painstakingly moved aside. So we need to check if the files
-# exist and move them out of the way AGAIN.
-ruby_block "rename Apple's stock postgres commands to avoid confusion" do
- block do
- new_dir="/usr/bin/postgres-orig"
- if ! ( File.exists?(new_dir) && File.directory?(new_dir) )
- Dir.mkdir(new_dir)
- end
- ["clusterdb", "createdb", "createlang", "createuser", "dropdb", "droplang", "dropuser", "ecpg", "initdb", "oid2name", "pg_archivecleanup", "pg_config", "pg_controldata", "pg_ctl", "pg_dump", "pg_dumpall", "pg_resetxlog", "pg_restore", "pg_standby", "pg_upgrade", "pgbench", "postgres", "postmaster", "psql", "reindexdb", "vacuumdb", "vacuumlo"].each do |pg_cmd|
- if File.exists?("/usr/bin/#{pg_cmd}")
- File.rename("/usr/bin/#{pg_cmd}","/usr/bin/postgres-orig/#{pg_cmd}")
- end
- end
- end
-end
-
ruby_block "test to see if postgres is running" do
block do
require 'socket'
View
10 recipes/textmate_bundles.rb
@@ -2,10 +2,10 @@
filename = "Pivotal.tmbundle"
tarfile = "#{filename}.tar.gz"
unless File.exists?("#{bundle_dir}/#{filename}")
- directory bundle_dir do
- action :create
- recursive true
- owner WS_USER
+ execute "make textmate bundles directory" do
+ command "mkdir -p '#{bundle_dir}'"
+ user WS_USER
+ not_if { File.exists?(bundle_dir) }
end
remote_file "#{bundle_dir}/#{tarfile}" do
@@ -15,4 +15,4 @@
end
execute "cd \"#{bundle_dir}\"; tar xzf #{tarfile}; rm #{tarfile}"
-end
+end
View
9 recipes/vim.rb
@@ -2,12 +2,9 @@
include_recipe "pivotal_workstation::ack"
include_recipe "pivotal_workstation::git"
-brew_install "macvim"
-
-#link "/Applications/MacVim.app" do
-# to "#{node["vim_app"]}"
-# owner WS_USER
-#end
+# https://github.com/mxcl/homebrew/pull/8394
+# default macvim doesn't compile yet with xcode 4.2
+brew_install("macvim", :brew_args => "--HEAD")
# There may be multiple macvims; try to find the latest one
# & link that to /Applications
View
3 templates/default/bash_profile-ctrl-o.sh.erb
@@ -0,0 +1,3 @@
+# enables CTRL+O, see
+# http://apple.stackexchange.com/questions/3253/ctrl-o-behavior-in-terminal-app
+stty discard undef
View
3 templates/default/bash_profile-ctrl-s.sh.erb
@@ -0,0 +1,3 @@
+# disable START/STOP output control
+# frees up CTRL+S for bash history forward search
+stty -ixon

No commit comments for this range

Something went wrong with that request. Please try again.