mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
Meta: Find mke2fs on macOS even if HOMEBREW_PREFIX is not set
...as long as `brew` is on the path and `brew --prefix e2fsprogs` tells us where it is. This is for people who don't have `"$(brew shellenv)"` in their .zshrc.
This commit is contained in:
parent
15ce757f12
commit
1a85539741
1 changed files with 8 additions and 2 deletions
|
@ -20,8 +20,14 @@ die() {
|
|||
find_executable() {
|
||||
paths=("/usr/sbin" "/sbin")
|
||||
|
||||
if [ "$(uname -s)" = "Darwin" ] && [ -n "${HOMEBREW_PREFIX}" ]; then
|
||||
paths+=("${HOMEBREW_PREFIX}/opt/e2fsprogs/bin" "${HOMEBREW_PREFIX}/opt/e2fsprogs/sbin")
|
||||
if [ "$(uname -s)" = "Darwin" ]; then
|
||||
if [ -n "${HOMEBREW_PREFIX}" ]; then
|
||||
paths+=("${HOMEBREW_PREFIX}/opt/e2fsprogs/bin" "${HOMEBREW_PREFIX}/opt/e2fsprogs/sbin")
|
||||
elif command -v brew > /dev/null 2>&1; then
|
||||
if prefix=$(brew --prefix e2fsprogs 2>/dev/null); then
|
||||
paths+=("${prefix}/bin" "${prefix}/sbin")
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
executable="${1}"
|
||||
|
|
Loading…
Add table
Reference in a new issue