Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not prepend $PATH in this_hipo.sh if bin/ is not installed #70

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion meson/this_hipo.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

# workaround older versions of macOS not having `realpath`
get_realpath() {
[ ! -d "$1" ] && echo "ERROR: path '$1' does not exist; this should never happen, please contact the maintainers" >&2
echo $(cd $1 && pwd -P)
}

Expand All @@ -18,7 +19,9 @@ export PKG_CONFIG_PATH=$HIPO/@libdir@/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_

# prepend to PATH
hipo_path=$(pkg-config --variable bindir hipo4)
[ -n "${hipo_path-}" ] && export PATH=$(get_realpath $hipo_path)${PATH:+:${PATH}}
if [ -n "${hipo_path-}" ]; then
[ -d "$hipo_path" ] && export PATH=$(get_realpath $hipo_path)${PATH:+:${PATH}}
fi
unset hipo_path

# prepend to @ld_path@
Expand Down
Loading