Skip to content

Commit

Permalink
fix: do not prepend $PATH in this_hipo.sh if bin/ is not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
c-dilks committed Nov 22, 2024
1 parent 5add7c5 commit bd68fe9
Showing 1 changed file with 4 additions and 1 deletion.
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

0 comments on commit bd68fe9

Please sign in to comment.