aboutsummaryrefslogtreecommitdiff
path: root/sh/profile
blob: dc145d85917ce70b4ae0c9b47eb2f94f6a70ce3e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Add ~/.local/bin to PATH if it exists
[ -d "$HOME"/.local/bin ] && PATH=$HOME/.local/bin:$PATH

# Load all supplementary scripts in ~/.profile.d
for sh in "$HOME"/.profile.d/*.sh ; do
    [ -e "$sh" ] && . "$sh"
done
unset -v sh

# If ~/.shinit exists, set ENV to that
if [ -f "$HOME"/.shinit ] ; then
    ENV=$HOME/.shinit
    export ENV
fi

# If ENV_FORCE is set and we're interactive, source ENV explicitly
# At the moment this is just for zsh-as-ksh/sh
if [ -n "$ENV_FORCE" ] ; then
    case $- in *i*)
        [ -f "$ENV" ] && . "$ENV" ;;
    esac
fi