diff options
| author | Max Howell | 2010-04-06 13:45:16 +0100 |
|---|---|---|
| committer | Max Howell | 2012-03-09 12:08:51 +0000 |
| commit | 16352d90b492a05a1feb09a0a1e475235eb37f60 (patch) | |
| tree | c13a009ecc27e207bf6760694496ae32f7b1c8b6 | |
| parent | e12165138fe4064d42a016249d13daa40db8c070 (diff) | |
| download | brew-16352d90b492a05a1feb09a0a1e475235eb37f60.tar.bz2 | |
Moved code to top ready for amend
| -rw-r--r-- | install_homebrew.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/install_homebrew.rb b/install_homebrew.rb index e0e28ed43..66c78d154 100644 --- a/install_homebrew.rb +++ b/install_homebrew.rb @@ -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 |
