summary refs log tree commit diff
path: root/pkgs/applications/science/misc/root/setup-hook.sh
blob: b26cf9b779f8431c7a653d1c313828223c259b8f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
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)