diff --git a/alias/shell b/alias/shell index 5e2654d..0b6a771 100644 --- a/alias/shell +++ b/alias/shell @@ -3,7 +3,7 @@ alias eetcbashrc="sudo gedit /etc/bash.bashrc" alias eetcprofile="sudo gedit /etc/profile" alias eprofile="gedit $HOME/.bash_profile" -alias cbashrc="cp $HOME/.bashrc $BASH_SHELL_BASE/setup" -alias cetcbashrc="cp /etc/bash.bashrc $BASH_SHELL_BASE/setup" -alias cprofile="cp $HOME/.bash_profile $BASH_SHELL_BASE/setup" -alias cetcprofile="cp /etc/profile $BASH_SHELL_BASE/setup" +alias cbashrc="cp $HOME/.bashrc $BASH_SHELL_BASE/setup/user" +alias cetcbashrc="cp /etc/bash.bashrc $BASH_SHELL_BASE/setup/etc" +alias cprofile="cp $HOME/.bash_profile $BASH_SHELL_BASE/setup/user" +alias cetcprofile="cp /etc/profile $BASH_SHELL_BASE/setup/etc" diff --git a/load.sh b/load.sh index ea8da2b..c316af7 100755 --- a/load.sh +++ b/load.sh @@ -5,7 +5,7 @@ DIR=${1:-$(dirname ${BASH_SOURCE[0]})} -[[ $(declare -F | grep module_load) ]] && echo module lib already loaded || source "$BASH_SHELL_BASE/module.lib" +[[ $(declare -F | grep module_load) ]] || source "$BASH_SHELL_BASE/module.lib" # uncomment for debuggin # echo $USER running load script in $DIR diff --git a/setup/deploy.sh b/setup/deploy.sh new file mode 100755 index 0000000..52df7a9 --- /dev/null +++ b/setup/deploy.sh @@ -0,0 +1,4 @@ +#!/bin/bash +sudo cp -viR $BASH_SHELL_BASE/setup/etc /etc/ +cp -viR $BASH_SHELL_BASE/setup/user $HOME/ +sudo cp -viR $BASH_SHELL_BASE/setup/root /root/ diff --git a/setup/etc/profile b/setup/etc/profile index fac7e0c..7e9004f 100644 --- a/setup/etc/profile +++ b/setup/etc/profile @@ -24,7 +24,7 @@ export BASH_SHELL_BASE=/opt/bash/shell/base # where if [[ $- == *i* ]]; then # interactive? echo interactive login shell if [[ ! $NO_LOGIN_BASHRC ]]; then - echo loading $BASH_SHELL_LOAD + # echo loading $BASH_SHELL_LOAD source "$BASH_SHELL_LOAD" else NORMAL="\[\e[0m\]" diff --git a/setup/fetch.sh b/setup/fetch.sh index 776d896..85b3b80 100755 --- a/setup/fetch.sh +++ b/setup/fetch.sh @@ -2,15 +2,15 @@ mkdir -p $BASH_SHELL_BASE/setup/etc/profile.d mkdir -p $BASH_SHELL_BASE/setup/user mkdir -p $BASH_SHELL_BASE/setup/root -cp /etc/profile $BASH_SHELL_BASE/setup/etc -cp /etc/bash.bashrc $BASH_SHELL_BASE/setup/etc -cp /etc/profile.d/02-root.sh $BASH_SHELL_BASE/setup/etc/profile.d -cp /etc/profile.d/03-startup.sh $BASH_SHELL_BASE/setup/etc/profile.d -cp $HOME/.bash_profile $BASH_SHELL_BASE/setup/user -cp $HOME/.profile $BASH_SHELL_BASE/setup/user -cp $HOME/.bashrc $BASH_SHELL_BASE/setup/user -cp $HOME/.bash_logout $BASH_SHELL_BASE/setup/user -cp /root/.bash_profile $BASH_SHELL_BASE/setup/root -cp /root/.profile $BASH_SHELL_BASE/setup/root -cp /root/.bashrc $BASH_SHELL_BASE/setup/root -cp /root/.bash_logout $BASH_SHELL_BASE/setup/root +cp -vi /etc/profile $BASH_SHELL_BASE/setup/etc +cp -vi /etc/bash.bashrc $BASH_SHELL_BASE/setup/etc +cp -vi /etc/profile.d/02-root.sh $BASH_SHELL_BASE/setup/etc/profile.d +cp -vi /etc/profile.d/03-startup.sh $BASH_SHELL_BASE/setup/etc/profile.d +cp -vi $HOME/.bash_profile $BASH_SHELL_BASE/setup/user +cp -vi $HOME/.profile $BASH_SHELL_BASE/setup/user +cp -vi $HOME/.bashrc $BASH_SHELL_BASE/setup/user +cp -vi $HOME/.bash_logout $BASH_SHELL_BASE/setup/user +cp -vi /root/.bash_profile $BASH_SHELL_BASE/setup/root +cp -vi /root/.profile $BASH_SHELL_BASE/setup/root +cp -vi /root/.bashrc $BASH_SHELL_BASE/setup/root +cp -vi /root/.bash_logout $BASH_SHELL_BASE/setup/root diff --git a/setup/root/.bashrc b/setup/root/.bashrc index c1e65d0..a988723 100644 --- a/setup/root/.bashrc +++ b/setup/root/.bashrc @@ -1 +1 @@ -echo $USER .bashrc +# echo $USER .bashrc diff --git a/setup/root/.profile b/setup/root/.profile index fe54bf2..754e83d 100644 --- a/setup/root/.profile +++ b/setup/root/.profile @@ -1,2 +1,2 @@ -# ~/.profile: executed by Bourne-compatible login shells. echo $USER .profile +echo "for bash login shell only called if .bash_profile does not exist" diff --git a/setup/user/.bash_logout b/setup/user/.bash_logout index e069ad7..de4f5f7 100644 --- a/setup/user/.bash_logout +++ b/setup/user/.bash_logout @@ -1,9 +1,7 @@ -#!/bin/bash +# ~/.bash_logout: executed by bash(1) when login shell exits. # when leaving the console clear the screen to increase privacy if [ "$SHLVL" = 1 ]; then [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q fi - -#now diff --git a/shell.env b/shell.env index 7ab11dc..5a01d3d 100644 --- a/shell.env +++ b/shell.env @@ -1,6 +1,6 @@ #!/bin/bash # Shell Repos Environment -echo loading shell.env +# echo loading shell.env # if bash is not the shell don't bother to continue [ ! "$SHELL" = "/bin/bash" ] && return 1 # sourced for non-login interactive shells