mirror of
https://github.com/kastdeur/dotfiles.git
synced 2024-12-22 09:13:33 +01:00
[bash] read .local/bash_profile if available
This commit is contained in:
parent
ce9fc9d752
commit
c923c38566
1 changed files with 7 additions and 2 deletions
|
@ -1,13 +1,18 @@
|
||||||
# ~/.bash_profile
|
# ~/.bash_profile
|
||||||
[ -z "$DOTFILES" ] && source "$HOME/.profile"
|
[ -z "$DOTFILES" ] && source "$HOME/.profile"
|
||||||
|
|
||||||
|
# Always source local bash_profiles
|
||||||
[ -r "$HOME/.bash_profile.local" ] && source "$HOME/.bash_profile.local"
|
[ -r "$HOME/.bash_profile.local" ] && source "$HOME/.bash_profile.local"
|
||||||
|
[ -r "$HOME/.local/bash_profile" ] && source "$HOME/.local/bash_profile"
|
||||||
|
|
||||||
if shopt -q login_shell
|
if shopt -q login_shell
|
||||||
then
|
then
|
||||||
# This is a bash login shell
|
# This is a bash login shell
|
||||||
LOGINHISTORY=~/.login.history
|
LOGINHISTORY=~/.login.history
|
||||||
LOGINSTRING="$(date) ${USER}@${HOSTNAME}"
|
|
||||||
|
|
||||||
echo $LOGINSTRING > $LOGINHISTORY
|
if [ -w "${LOGINHISTORY}" ]; then
|
||||||
|
echo "$(date) ${USER}@${HOSTNAME}" >> $LOGINHISTORY
|
||||||
|
fi
|
||||||
|
|
||||||
|
unset LOGINHISTORY
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue