use an include guard with .profile

This commit is contained in:
Tobias Schmidl 2018-06-05 04:55:45 +02:00
parent dd400479b7
commit 7266c6f828

View file

@ -8,20 +8,14 @@
# for ssh logins, install and configure the libpam-umask package. # for ssh logins, install and configure the libpam-umask package.
#umask 022 #umask 022
# if running bash if [ -z $PROFILE_ALREADY_SET ];
if [ -n "$BASH_VERSION" ]; then then
# include .bashrc if it exists export PROFILE_ALREADY_SET=1
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# set PATH so it includes user's private bin if it exists # if running bash, include .bashrc if it exists
if [ -d "$HOME/bin" ] ; then [ -n "$BASH_VERSION" -a -f "$HOME/.bashrc" ] && . "$HOME/.bashrc";
PATH="$HOME/bin:$PATH"
fi
# set PATH so it includes user's private bin if it exists # set PATH so it includes user's private bin dirs if they exist
if [ -d "$HOME/.local/bin" ] ; then [ -d "$HOME/.local/bin" ] && PATH="$HOME/.local/bin:$PATH"
PATH="$HOME/.local/bin:$PATH" [ -d "$HOME/bin" ] && PATH="$HOME/bin:$PATH"
fi fi