added deploy for system/user/root shell files
parent
c436c07493
commit
527636a48e
|
@ -3,7 +3,7 @@ alias eetcbashrc="sudo gedit /etc/bash.bashrc"
|
||||||
alias eetcprofile="sudo gedit /etc/profile"
|
alias eetcprofile="sudo gedit /etc/profile"
|
||||||
alias eprofile="gedit $HOME/.bash_profile"
|
alias eprofile="gedit $HOME/.bash_profile"
|
||||||
|
|
||||||
alias cbashrc="cp $HOME/.bashrc $BASH_SHELL_BASE/setup"
|
alias cbashrc="cp $HOME/.bashrc $BASH_SHELL_BASE/setup/user"
|
||||||
alias cetcbashrc="cp /etc/bash.bashrc $BASH_SHELL_BASE/setup"
|
alias cetcbashrc="cp /etc/bash.bashrc $BASH_SHELL_BASE/setup/etc"
|
||||||
alias cprofile="cp $HOME/.bash_profile $BASH_SHELL_BASE/setup"
|
alias cprofile="cp $HOME/.bash_profile $BASH_SHELL_BASE/setup/user"
|
||||||
alias cetcprofile="cp /etc/profile $BASH_SHELL_BASE/setup"
|
alias cetcprofile="cp /etc/profile $BASH_SHELL_BASE/setup/etc"
|
||||||
|
|
2
load.sh
2
load.sh
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
DIR=${1:-$(dirname ${BASH_SOURCE[0]})}
|
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
|
# uncomment for debuggin
|
||||||
# echo $USER running load script in $DIR
|
# echo $USER running load script in $DIR
|
||||||
|
|
|
@ -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/
|
|
@ -24,7 +24,7 @@ export BASH_SHELL_BASE=/opt/bash/shell/base # where
|
||||||
if [[ $- == *i* ]]; then # interactive?
|
if [[ $- == *i* ]]; then # interactive?
|
||||||
echo interactive login shell
|
echo interactive login shell
|
||||||
if [[ ! $NO_LOGIN_BASHRC ]]; then
|
if [[ ! $NO_LOGIN_BASHRC ]]; then
|
||||||
echo loading $BASH_SHELL_LOAD
|
# echo loading $BASH_SHELL_LOAD
|
||||||
source "$BASH_SHELL_LOAD"
|
source "$BASH_SHELL_LOAD"
|
||||||
else
|
else
|
||||||
NORMAL="\[\e[0m\]"
|
NORMAL="\[\e[0m\]"
|
||||||
|
|
|
@ -2,15 +2,15 @@
|
||||||
mkdir -p $BASH_SHELL_BASE/setup/etc/profile.d
|
mkdir -p $BASH_SHELL_BASE/setup/etc/profile.d
|
||||||
mkdir -p $BASH_SHELL_BASE/setup/user
|
mkdir -p $BASH_SHELL_BASE/setup/user
|
||||||
mkdir -p $BASH_SHELL_BASE/setup/root
|
mkdir -p $BASH_SHELL_BASE/setup/root
|
||||||
cp /etc/profile $BASH_SHELL_BASE/setup/etc
|
cp -vi /etc/profile $BASH_SHELL_BASE/setup/etc
|
||||||
cp /etc/bash.bashrc $BASH_SHELL_BASE/setup/etc
|
cp -vi /etc/bash.bashrc $BASH_SHELL_BASE/setup/etc
|
||||||
cp /etc/profile.d/02-root.sh $BASH_SHELL_BASE/setup/etc/profile.d
|
cp -vi /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 -vi /etc/profile.d/03-startup.sh $BASH_SHELL_BASE/setup/etc/profile.d
|
||||||
cp $HOME/.bash_profile $BASH_SHELL_BASE/setup/user
|
cp -vi $HOME/.bash_profile $BASH_SHELL_BASE/setup/user
|
||||||
cp $HOME/.profile $BASH_SHELL_BASE/setup/user
|
cp -vi $HOME/.profile $BASH_SHELL_BASE/setup/user
|
||||||
cp $HOME/.bashrc $BASH_SHELL_BASE/setup/user
|
cp -vi $HOME/.bashrc $BASH_SHELL_BASE/setup/user
|
||||||
cp $HOME/.bash_logout $BASH_SHELL_BASE/setup/user
|
cp -vi $HOME/.bash_logout $BASH_SHELL_BASE/setup/user
|
||||||
cp /root/.bash_profile $BASH_SHELL_BASE/setup/root
|
cp -vi /root/.bash_profile $BASH_SHELL_BASE/setup/root
|
||||||
cp /root/.profile $BASH_SHELL_BASE/setup/root
|
cp -vi /root/.profile $BASH_SHELL_BASE/setup/root
|
||||||
cp /root/.bashrc $BASH_SHELL_BASE/setup/root
|
cp -vi /root/.bashrc $BASH_SHELL_BASE/setup/root
|
||||||
cp /root/.bash_logout $BASH_SHELL_BASE/setup/root
|
cp -vi /root/.bash_logout $BASH_SHELL_BASE/setup/root
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
echo $USER .bashrc
|
# echo $USER .bashrc
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
# ~/.profile: executed by Bourne-compatible login shells.
|
|
||||||
echo $USER .profile
|
echo $USER .profile
|
||||||
|
echo "for bash login shell only called if .bash_profile does not exist"
|
||||||
|
|
|
@ -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
|
# when leaving the console clear the screen to increase privacy
|
||||||
|
|
||||||
if [ "$SHLVL" = 1 ]; then
|
if [ "$SHLVL" = 1 ]; then
|
||||||
[ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
|
[ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#now
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Shell Repos Environment
|
# Shell Repos Environment
|
||||||
echo loading shell.env
|
# echo loading shell.env
|
||||||
# if bash is not the shell don't bother to continue
|
# if bash is not the shell don't bother to continue
|
||||||
[ ! "$SHELL" = "/bin/bash" ] && return 1
|
[ ! "$SHELL" = "/bin/bash" ] && return 1
|
||||||
# sourced for non-login interactive shells
|
# sourced for non-login interactive shells
|
||||||
|
|
Reference in New Issue