Skip to content

Commit

Permalink
Merge pull request #4381 from maxim-belkin/make-shim-linux
Browse files Browse the repository at this point in the history
Add make shim to Linux super env
  • Loading branch information
MikeMcQuaid authored Jul 12, 2018
2 parents 4ffc8b1 + 547751d commit 0367b7c
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions Library/Homebrew/shims/linux/super/make
Original file line number Diff line number Diff line change
@@ -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" "$@"

0 comments on commit 0367b7c

Please sign in to comment.