mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 02:12:09 -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() {
|
find_executable() {
|
||||||
paths=("/usr/sbin" "/sbin")
|
paths=("/usr/sbin" "/sbin")
|
||||||
|
|
||||||
if [ "$(uname -s)" = "Darwin" ] && [ -n "${HOMEBREW_PREFIX}" ]; then
|
if [ "$(uname -s)" = "Darwin" ]; then
|
||||||
paths+=("${HOMEBREW_PREFIX}/opt/e2fsprogs/bin" "${HOMEBREW_PREFIX}/opt/e2fsprogs/sbin")
|
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
|
fi
|
||||||
|
|
||||||
executable="${1}"
|
executable="${1}"
|
||||||
|
|
Loading…
Add table
Reference in a new issue