aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Howell2011-08-23 22:01:27 +0100
committerMax Howell2012-03-09 12:10:50 +0000
commitcb3ffba6351f8874115138bc08f723bb1a3d557c (patch)
treed463aec5f224eda1042fa879361b82f6367e14f0
parent9c5ad5c978cb4cad86e264a739cc35bf1391e317 (diff)
downloadbrew-cb3ffba6351f8874115138bc08f723bb1a3d557c.tar.bz2
Revert "Ensure that we undo the o+w chmod"
This reverts commit b3d5ac0c8500006ef4fbd0bf3bd53b22a06869ab.
-rw-r--r--install_homebrew.rb31
1 files changed, 15 insertions, 16 deletions
diff --git a/install_homebrew.rb b/install_homebrew.rb
index c172f058f..f77aa947c 100644
--- a/install_homebrew.rb
+++ b/install_homebrew.rb
@@ -114,24 +114,23 @@ end
sudo "/bin/mkdir /usr/local" unless File.directory? "/usr/local"
sudo "/bin/chmod o+w /usr/local"
-begin
- sudo "/bin/chmod", "g+w", *chmods unless chmods.empty?
- sudo "/usr/bin/chgrp", "staff", *chgrps unless chgrps.empty?
- system "/bin/mkdir", *root_dirs unless root_dirs.empty?
-
- Dir.chdir "/usr/local" do
- ohai "Downloading and Installing Homebrew..."
- # -m to stop tar erroring out if it can't modify the mtime for root owned directories
- # pipefail to cause the exit status from curl to propogate if it fails
- system "/bin/bash -o pipefail -c '/usr/bin/curl -sSfL https://github.com/mxcl/homebrew/tarball/master | /usr/bin/tar xz -m --strip 1'"
- end
-ensure
- # we reset the permissions of /usr/local because we want to minimise the
- # amount of fiddling we do to the system. Some tools require /usr/local to
- # be by non-writable for non-root users.
- sudo "/bin/chmod o-w /usr/local"
+sudo "/bin/chmod", "g+w", *chmods unless chmods.empty?
+sudo "/usr/bin/chgrp", "staff", *chgrps unless chgrps.empty?
+system "/bin/mkdir", *root_dirs unless root_dirs.empty?
+
+
+Dir.chdir "/usr/local" do
+ ohai "Downloading and Installing Homebrew..."
+ # -m to stop tar erroring out if it can't modify the mtime for root owned directories
+ # pipefail to cause the exit status from curl to propogate if it fails
+ system "/bin/bash -o pipefail -c '/usr/bin/curl -sSfL https://github.com/mxcl/homebrew/tarball/master | /usr/bin/tar xz -m --strip 1'"
end
+# we reset the permissions of /usr/local because we want to minimise the
+# amount of fiddling we do to the system. Some tools require /usr/local to be
+# by non-writable for non-root users.
+sudo "/bin/chmod o-w /usr/local"
+
warn "/usr/local/bin is not in your PATH." unless ENV['PATH'].split(':').include? '/usr/local/bin'
warn "Now install Xcode: http://developer.apple.com/technologies/xcode.html" unless Kernel.system "/usr/bin/which -s gcc"