fix installer
This commit is contained in:
parent
aa53908efe
commit
fc198102de
3 changed files with 7 additions and 8 deletions
10
bash_rc
10
bash_rc
|
@ -32,7 +32,7 @@ source "${HOME}/.bashrc_ps1"
|
||||||
# Format history records
|
# Format history records
|
||||||
export HISTTIMEFORMAT="[%s] "
|
export HISTTIMEFORMAT="[%s] "
|
||||||
# Append to history file
|
# Append to history file
|
||||||
#PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
|
PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
|
||||||
# Share between shells
|
# Share between shells
|
||||||
PROMPT_COMMAND="history -c; history -r; $PROMPT_COMMAND"
|
PROMPT_COMMAND="history -c; history -r; $PROMPT_COMMAND"
|
||||||
# Don't overwrite it history
|
# Don't overwrite it history
|
||||||
|
@ -115,12 +115,10 @@ export SCREENDIR="${HOME}/.screen"
|
||||||
|
|
||||||
# Set other bashrc files
|
# Set other bashrc files
|
||||||
mkdir -p "${HOME}/.bashrc.d"
|
mkdir -p "${HOME}/.bashrc.d"
|
||||||
while read -r bashrc_file
|
for bashrc_file in $(find "${HOME}/.bashrc.d" -type f | sort | grep -v ~$)
|
||||||
do
|
do
|
||||||
if [ -z "${bashrc_file}" ]; then
|
if [ -n "${bashrc_file}" ]; then
|
||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1090
|
||||||
source "${bashrc_file}"
|
source "${bashrc_file}"
|
||||||
fi
|
fi
|
||||||
done <<< "$(find "${HOME}/.bashrc.d" -type f | sort | grep -v ~$)"
|
done
|
||||||
|
|
||||||
#[ -z "$TMUX" ] && { tmux attach || exec tmux new-session && exit;}
|
|
||||||
|
|
|
@ -5,5 +5,6 @@ my_dir=$(dirname "${0}")
|
||||||
if [ -e "${HOME}/.bashrc" ]; then
|
if [ -e "${HOME}/.bashrc" ]; then
|
||||||
mv "${HOME}/.bashrc" "${HOME}/.bashrc.bak"
|
mv "${HOME}/.bashrc" "${HOME}/.bashrc.bak"
|
||||||
fi
|
fi
|
||||||
cp "${my_dir}/bash_rc" "${HOME}/.bashrc" -rfp
|
cd "${my_dir}" ||exit 1
|
||||||
cp "${my_dir}/bashrc.d" "${HOME}/.bashrc.d" -rfp
|
cp bash_rc "${HOME}/.bashrc" -rfp
|
||||||
|
cp bashrc.d/* "${HOME}/.bashrc.d/" -rfp
|
||||||
|
|
Loading…
Reference in a new issue