Moved code to top ready for amend

This commit is contained in:
Max Howell 2010-04-06 13:45:16 +01:00
parent e12165138f
commit 16352d90b4

View File

@ -76,6 +76,10 @@ end
abort "/usr/local/.git already exists!" if File.directory? "/usr/local/.git"
abort "Don't run this as root!" if Process.uid == 0
unless `groups`.split.include?("staff")
ohai "The user #{`whoami`.strip} will be added to the staff group."
end
ohai "This script will install:"
puts "/usr/local/bin/brew"
puts "/usr/local/Library/Formula/..."
@ -86,10 +90,6 @@ chmods = %w(bin etc include lib sbin share var . share/locale share/man share/in
select{ |d| File.directory? d and not File.writable? d }
chgrps = chmods.reject{ |d| File.stat(d).grpowned? }
unless `groups`.split.include?("staff")
ohai "The user #{`whoami`.strip} will be added to the staff group."
end
unless chmods.empty?
ohai "The following directories will be made group writable:"
puts *chmods