nixpkgs/pkgs/applications/science/misc/root/setup-hook.sh

14 lines
269 B
Bash
Raw Normal View History

2016-09-18 10:45:10 +02:00
thisroot () {
# Workaround thisroot.sh dependency on man
if [ -z "${MANPATH-}" ]; then
2016-09-18 10:45:10 +02:00
MANPATH=:
fi
local oldOpts="-u"
shopt -qo nounset || oldOpts="+u"
set +u
2016-09-18 10:45:10 +02:00
source @out@/bin/thisroot.sh
set "$oldOpts"
2016-09-18 10:45:10 +02:00
}
postHooks+=(thisroot)