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.
#umask 022
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
if [ -z $PROFILE_ALREADY_SET ];
then
export PROFILE_ALREADY_SET=1
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
# if running bash, include .bashrc if it exists
[ -n "$BASH_VERSION" -a -f "$HOME/.bashrc" ] && . "$HOME/.bashrc";
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
# set PATH so it includes user's private bin dirs if they exist
[ -d "$HOME/.local/bin" ] && PATH="$HOME/.local/bin:$PATH"
[ -d "$HOME/bin" ] && PATH="$HOME/bin:$PATH"
fi