Merge pull request #4381 from maxim-belkin/make-shim-linux

Add make shim to Linux super env
This commit is contained in:
Mike McQuaid 2018-07-12 19:57:54 +01:00 committed by GitHub
commit 0367b7c330
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,26 @@
#!/bin/bash
if [[ -n "$HOMEBREW_MAKE" && "$HOMEBREW_MAKE" != "make" ]]
then
export MAKE="$HOMEBREW_MAKE"
else
MAKE="make"
fi
export HOMEBREW_CCCFG="O$HOMEBREW_CCCFG"
pathremove () {
local IFS=':'
local NEWPATH
local DIR
local PATHVARIABLE=${2:-PATH}
for DIR in ${!PATHVARIABLE} ; do
if [ "$DIR" != "$1" ] ; then
NEWPATH=${NEWPATH:+$NEWPATH:}$DIR
fi
done
export $PATHVARIABLE="$NEWPATH"
}
pathremove "$HOMEBREW_LIBRARY/Homebrew/shims/linux/super"
exec "$MAKE" "$@"