brew: use a shell wrapper script for brew
This allows us to force using the system Ruby on OSX but allow the development of Homebrew for Linux or Windows to not rely on OSX paths. Closes Homebrew/homebrew#17548.
This commit is contained in:
parent
7344149f52
commit
faa066b109
14
bin/brew
Executable file
14
bin/brew
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
THIS_FILE="$0"
|
||||
[ -n "$(readlink $THIS_FILE)" ] && THIS_FILE=$(readlink $THIS_FILE)
|
||||
|
||||
BREW_DIRECTORY=$(dirname "$THIS_FILE")/../Library
|
||||
BREW_SYSTEM=$(uname -s | tr "[:upper:]" "[:lower:]")
|
||||
|
||||
if [ "$BREW_SYSTEM" = "darwin" ]
|
||||
then
|
||||
exec "$BREW_DIRECTORY/brew.rb" "$@"
|
||||
else
|
||||
exec ruby -W0 "$BREW_DIRECTORY/brew.rb" "$@"
|
||||
fi
|
||||
Loading…
x
Reference in New Issue
Block a user