prepare for temporary bashrc with tmux
This commit is contained in:
parent
1884a7ebff
commit
3ea2b6f1d2
1 changed files with 176 additions and 171 deletions
15
bashrc_add
15
bashrc_add
|
@ -16,6 +16,8 @@
|
|||
# https://guide.bash.academy/expansions/
|
||||
# https://www.tldp.org/LDP/abs/html/refcards.html#AEN22473
|
||||
if [[ $- = *i* ]] ; then
|
||||
if [ "${BASHRC_TMP:-x}" == "x" ]
|
||||
then
|
||||
#echo "interactive shell" >&2
|
||||
|
||||
# define variables
|
||||
|
@ -44,7 +46,7 @@ if [[ $- = *i* ]] ; then
|
|||
[ -z "${GIT_COMMITTER_NAME+x}" ] && export GIT_COMMITTER_NAME=$FULLNAME
|
||||
[ -z "${GIT_COMMITTER_EMAIL+x}" ] && export GIT_COMMITTER_EMAIL=$USEREMAIL
|
||||
|
||||
# [ -z "${MSC_GIT_TIMEOUT+x}" ] && export MSC_GIT_TIMEOUT=5s
|
||||
# [ -z "${MSC_GIT_TIMEOUT+x}" ] && export MSC_GIT_TIMEOUT=5s
|
||||
[ -z "${MSC_GIT_CHECKOUT_TIMEOUT+x}" ] && export MSC_GIT_CHECKOUT_TIMEOUT=20s
|
||||
[ -z "${MSC_GIT_SYNC+x}" ] && export MSC_GIT_SYNC=true
|
||||
|
||||
|
@ -70,8 +72,8 @@ if [[ $- = *i* ]] ; then
|
|||
# P11M for etoken/smartcard authentification
|
||||
# Use PKCS11_MODULE or P11M (comes from ssh, when connected from remote) only in context of startagent/loadagent
|
||||
|
||||
# which dnf >/dev/null 2>&1 [ -z "${P11M+x}" ] && P11M="$(dnf repoquery --installed -l p11-kit | grep \/p11-kit-proxy.so\$ | head -1)"
|
||||
# which dpkg >/dev/null 2>&1 && [ -z "${P11M+x}" ] && P11M="$(dpkg -L p11-kit-modules|grep \/p11-kit-proxy.so\$ | head -1)"
|
||||
# which dnf >/dev/null 2>&1 [ -z "${P11M+x}" ] && P11M="$(dnf repoquery --installed -l p11-kit | grep \/p11-kit-proxy.so\$ | head -1)"
|
||||
# which dpkg >/dev/null 2>&1 && [ -z "${P11M+x}" ] && P11M="$(dpkg -L p11-kit-modules|grep \/p11-kit-proxy.so\$ | head -1)"
|
||||
|
||||
|
||||
# Basics
|
||||
|
@ -206,8 +208,8 @@ EOF
|
|||
==8<=== finished configure new shell ================ $(date) ===============8<==
|
||||
|
||||
EOF
|
||||
#else
|
||||
# echo "non-interactive shell" >&2
|
||||
#else
|
||||
# echo "non-interactive shell" >&2
|
||||
SCRIPTEXIT
|
||||
|
||||
# Start tmux if not defined as STARTTMUX in bashrc
|
||||
|
@ -227,5 +229,8 @@ EOF
|
|||
logdebug "started tmux"
|
||||
fi
|
||||
logdebug "after"
|
||||
else
|
||||
exec bash --rcfile "${BASHRC_TMP}"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue