Moved code to top ready for amend
This commit is contained in:
parent
e12165138f
commit
16352d90b4
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user