diff --git a/roles/home-cli/files/bash_profile b/roles/home-cli/files/bash_profile index ba5adab..ebf359a 100644 --- a/roles/home-cli/files/bash_profile +++ b/roles/home-cli/files/bash_profile @@ -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" diff --git a/roles/home-cli/files/bashrc b/roles/home-cli/files/bashrc index 6de9abe..51e6448 100644 --- a/roles/home-cli/files/bashrc +++ b/roles/home-cli/files/bashrc @@ -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 diff --git a/roles/home-cli/files/profile b/roles/home-cli/files/profile index 5689e58..0790c29 100644 --- a/roles/home-cli/files/profile +++ b/roles/home-cli/files/profile @@ -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 diff --git a/roles/home-cli/files/shrc b/roles/home-cli/files/shrc index fbc0fdc..89c3ed2 100644 --- a/roles/home-cli/files/shrc +++ b/roles/home-cli/files/shrc @@ -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 diff --git a/roles/home-cli/files/zprofile b/roles/home-cli/files/zprofile index b1ea3c5..76fab1e 100644 --- a/roles/home-cli/files/zprofile +++ b/roles/home-cli/files/zprofile @@ -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 diff --git a/roles/home-cli/files/zshrc b/roles/home-cli/files/zshrc index cb05929..fc5bffe 100644 --- a/roles/home-cli/files/zshrc +++ b/roles/home-cli/files/zshrc @@ -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