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 #!/bin/bash
if [ -r /etc/profile ] if [ -r /usr/local/etc/bash_profile ]
then then
. /etc/profile . /usr/local/etc/bash_profile
elif [ -r /etc/bash_profile ]
then
. /etc/bash_profile
fi fi
export BASH_ENV="$HOME/.bashrc" export BASH_ENV="$HOME/.bashrc"

View file

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

View file

@ -1,4 +1,12 @@
#!/bin/sh #!/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 ANSIBLE_NOCOWS=1
export BLOCKSIZE=K export BLOCKSIZE=K
export EDITOR=vi export EDITOR=vi

View file

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

View file

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

View file

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