aboutsummaryrefslogtreecommitdiffstats
path: root/Library/ENV
diff options
context:
space:
mode:
authorJack Nagel2013-03-03 22:11:26 -0600
committerJack Nagel2013-03-06 17:06:07 -0600
commitdc7650fcedce16340ad9d356449b937f9fef451d (patch)
tree7e56b049d7ac25876551c1abef9dcf5f389a4e5c /Library/ENV
parent5d2e5e743814a0e1c4bd1b479a1e3dcf93c49cb5 (diff)
downloadhomebrew-dc7650fcedce16340ad9d356449b937f9fef451d.tar.bz2
superenv/cc: make file loadable
Diffstat (limited to 'Library/ENV')
-rwxr-xr-xLibrary/ENV/4.3/cc20
1 files changed, 11 insertions, 9 deletions
diff --git a/Library/ENV/4.3/cc b/Library/ENV/4.3/cc
index 1f79602ff..fb56a0581 100755
--- a/Library/ENV/4.3/cc
+++ b/Library/ENV/4.3/cc
@@ -196,14 +196,16 @@ class Cmd
end
end
-####################################################################### sanity
-abort "The build-tool has reset ENV. --env=std required." unless ENV['HOMEBREW_BREW_FILE']
+if __FILE__ == $PROGRAM_NAME
+ ##################################################################### sanity
+ abort "The build-tool has reset ENV. --env=std required." unless ENV['HOMEBREW_BREW_FILE']
-case ENV['HOMEBREW_CC'].chuzzle when 'cc', nil
- # those values are not allowed
- ENV['HOMEBREW_CC'] = 'clang'
-end
+ case ENV['HOMEBREW_CC'].chuzzle when 'cc', nil
+ # those values are not allowed
+ ENV['HOMEBREW_CC'] = 'clang'
+ end
-######################################################################### main
-cmd = Cmd.new($0, ARGV)
-exec "xcrun", cmd.tool, *cmd.args
+ ####################################################################### main
+ cmd = Cmd.new($0, ARGV)
+ exec "xcrun", cmd.tool, *cmd.args
+end