Revert "Ensure that we undo the o+w chmod"

This reverts commit b3d5ac0c8500006ef4fbd0bf3bd53b22a06869ab.
This commit is contained in:
Max Howell 2011-08-23 22:01:27 +01:00
parent 9c5ad5c978
commit cb3ffba635

View File

@ -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?
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"
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"