Load files from /usr/local then /etc

This commit is contained in:
Anthony Rose 2022-08-23 15:10:57 +01:00
parent bfb00f9d7b
commit 1dc9dbd558
6 changed files with 35 additions and 7 deletions

View file

@ -1,7 +1,10 @@
#!/bin/bash
if [ -r /etc/profile ]
if [ -r /usr/local/etc/bash_profile ]
then
. /etc/profile
. /usr/local/etc/bash_profile
elif [ -r /etc/bash_profile ]
then
. /etc/bash_profile
fi
export BASH_ENV="$HOME/.bashrc"

View file

@ -8,7 +8,10 @@ case "$-" in
;;
esac
if [ -f /etc/bashrc ]
if [ -r /usr/local/etc/bashrc ]
then
. /usr/local/etc/bashrc
elif [ -r /etc/bashrc ]
then
. /etc/bashrc
fi
@ -25,7 +28,7 @@ bind 'set completion-ignore-case on'
bind 'set enable-bracketed-paste off'
export PS1="\[\033[01m\]\u@\h\\$\[\033[00m\] "
if [ -f "$HOME/.shrc" ]
if [ -r "$HOME/.shrc" ]
then
. "$HOME/.shrc"
fi

View file

@ -1,4 +1,12 @@
#!/bin/sh
if [ -r /usr/local/etc/profile ]
then
. /usr/local/etc/profile
elif [ -r /etc/profile ]
then
. /etc/profile
fi
export ANSIBLE_NOCOWS=1
export BLOCKSIZE=K
export EDITOR=vi

View file

@ -13,6 +13,14 @@ case "$-" in
;;
esac
if [ -r /usr/local/etc/shrc ]
then
. /usr/local/etc/shrc
elif [ -r /etc/shrc ]
then
. /etc/shrc
fi
if [ -d /var/acp ]
then
export ACP=/var/acp

View file

@ -1,5 +1,8 @@
#!/bin/zsh
if [ -r /etc/zprofile ]
if [ -r /usr/local/etc/zprofile ]
then
. /usr/local/etc/zprofile ]
elif [ -r /etc/zprofile ]
then
. /etc/zprofile
fi

View file

@ -8,7 +8,10 @@ case "$-" in
;;
esac
if [ -f /etc/zshrc ]
if [ -r /usr/local/etc/zshrc ]
then
. /usr/local/etc/zshrc
elif [ -r /etc/zshrc ]
then
. /etc/zshrc
fi
@ -26,7 +29,7 @@ bindkey "^[OB" history-beginning-search-forward
export PS1="%B%n@%m%#%b "
if [ -e "$HOME/.shrc" ]
if [ -r "$HOME/.shrc" ]
then
emulate sh -c '. "$HOME/.shrc"'
fi