depot/third_party/nixpkgs/pkgs/applications/science/misc/root/setup-hook.sh
Default email b450903751 Project import generated by Copybara.
GitOrigin-RevId: 74a1793c659d09d7cf738005308b1f86c90cb59b
2022-09-09 16:08:57 +02:00

19 lines
390 B
Bash

thisroot () {
# Workaround thisroot.sh dependency on man
if [ -z "${MANPATH-}" ]; then
MANPATH=:
fi
local oldOpts="-u"
shopt -qo nounset || oldOpts="+u"
set +u
source @out@/bin/thisroot.sh
set "$oldOpts"
}
postHooks+=(thisroot)
addRootInludePath() {
addToSearchPath ROOT_INCLUDE_PATH $1/include
}
addEnvHooks "$targetOffset" addRootInludePath