load local files in extra file
This commit is contained in:
parent
ad3231d6f1
commit
c49cf2398f
3 changed files with 18 additions and 10 deletions
|
@ -249,7 +249,7 @@ sshs() {
|
||||||
# VIMMKTMPCMD="mktemp ${XDG_RUNTIME_DIR}/vimrc.XXXXXXXX.conf"
|
# VIMMKTMPCMD="mktemp ${XDG_RUNTIME_DIR}/vimrc.XXXXXXXX.conf"
|
||||||
|
|
||||||
local TMPBASHCONFIG=$(mktemp -p ${XDG_RUNTIME_DIR} -t bashrc.XXXXXXXX --suffix=.conf)
|
local TMPBASHCONFIG=$(mktemp -p ${XDG_RUNTIME_DIR} -t bashrc.XXXXXXXX --suffix=.conf)
|
||||||
local FILELIST=( "${MYSHELLCONFIG_BASE}/functions.sh" "${MYSHELLCONFIG_BASE}/aliases" "${HOME}/.aliases" "${MYSHELLCONFIG_BASE}/PS1" "${MYSHELLCONFIG_BASE}/bash_completion.d/*" )
|
local FILELIST=( "${MYSHELLCONFIG_BASE}/myshell_load_fortmpconfig" "${MYSHELLCONFIG_BASE}/functions.sh" "${MYSHELLCONFIG_BASE}/aliases" "${MYSHELLCONFIG_BASE}/PS1" "${MYSHELLCONFIG_BASE}/bash_completion.d/*" )
|
||||||
|
|
||||||
# Read /etc/bashrc or /etc/bash.bashrc (depending on distribution) and /etc/profile.d/*.sh first
|
# Read /etc/bashrc or /etc/bash.bashrc (depending on distribution) and /etc/profile.d/*.sh first
|
||||||
cat << EOF >> "${TMPBASHCONFIG}"
|
cat << EOF >> "${TMPBASHCONFIG}"
|
||||||
|
|
|
@ -19,11 +19,6 @@ if ! $SSHS; then
|
||||||
# User specific aliases and function
|
# User specific aliases and function
|
||||||
|
|
||||||
|
|
||||||
if [ -d "${HOME}/bin" ] ; then
|
|
||||||
pathmunge "${HOME}/bin"
|
|
||||||
export PATH
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -d "${MYSHELLCONFIG_BASE}/bin" ] ; then
|
if [ -d "${MYSHELLCONFIG_BASE}/bin" ] ; then
|
||||||
pathmunge "${MYSHELLCONFIG_BASE}/bin"
|
pathmunge "${MYSHELLCONFIG_BASE}/bin"
|
||||||
export PATH
|
export PATH
|
||||||
|
@ -38,10 +33,6 @@ if ! $SSHS; then
|
||||||
. "${MYSHELLCONFIG_BASE}/aliases"
|
. "${MYSHELLCONFIG_BASE}/aliases"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f ~/.aliases ]; then
|
|
||||||
. ~/.aliases
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f "${MYSHELLCONFIG_BASE}/PS1" ]; then
|
if [ -f "${MYSHELLCONFIG_BASE}/PS1" ]; then
|
||||||
. "${MYSHELLCONFIG_BASE}/PS1"
|
. "${MYSHELLCONFIG_BASE}/PS1"
|
||||||
fi
|
fi
|
||||||
|
@ -52,6 +43,11 @@ if ! $SSHS; then
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
.
|
||||||
|
if [ -f "${MYSHELLCONFIG_BASE}/PS1" ]; then
|
||||||
|
. "${MYSHELLCONFIG_BASE}/myshell_load_fortmpconfig"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
|
|
||||||
|
|
12
myshell_load_fortmpconfig
Normal file
12
myshell_load_fortmpconfig
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# load this in temporary config and also in myshellconfig permanent
|
||||||
|
if [ -d "${HOME}/bin" ] ; then
|
||||||
|
pathmunge "${HOME}/bin"
|
||||||
|
export PATH
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f ~/.aliases ]; then
|
||||||
|
. ~/.aliases
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue