mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-10-26 23:11:34 +03: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
Notes:
sideshowbarker
2024-07-17 06:40:35 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/1a85539741 Pull-request: https://github.com/SerenityOS/serenity/pull/16581 Reviewed-by: https://github.com/ADKaster ✅
@ -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
|
||||||
|
if [ -n "${HOMEBREW_PREFIX}" ]; then
|
||||||
paths+=("${HOMEBREW_PREFIX}/opt/e2fsprogs/bin" "${HOMEBREW_PREFIX}/opt/e2fsprogs/sbin")
|
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…
Reference in New Issue
Block a user