Use parameter expansion to avoid forking
This commit is contained in:
parent
74e4fdfce2
commit
bb750e1439
7
bin/brew
7
bin/brew
@ -1,9 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
BREW_FILE_DIRECTORY=$(dirname "$0")
|
BREW_FILE_DIRECTORY=$(cd "${0%/*}" && pwd -P)
|
||||||
BREW_FILE_DIRECTORY=$(cd "$BREW_FILE_DIRECTORY" && pwd -P)
|
export HOMEBREW_BREW_FILE="$BREW_FILE_DIRECTORY/${0##*/}"
|
||||||
|
|
||||||
BREW_FILENAME=$(basename "$0")
|
|
||||||
export HOMEBREW_BREW_FILE="$BREW_FILE_DIRECTORY/$BREW_FILENAME"
|
|
||||||
|
|
||||||
BREW_SYMLINK=$(readlink $0)
|
BREW_SYMLINK=$(readlink $0)
|
||||||
if [ -n "$BREW_SYMLINK" ]
|
if [ -n "$BREW_SYMLINK" ]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user