remove old bashrc_add source

This commit is contained in:
Jakobus Schürz 2020-01-14 14:42:01 +01:00
parent eab99b2745
commit 7345cdf5bd

View file

@ -230,9 +230,7 @@ sshmyshellconfig() {
[ -e /etc/bashrc ] && . /etc/bashrc
[ -e /etc/bash.bashrc ] && . /etc/bash.bashrc
echo "modify ~/.bashrc"
if grep -q "[ -f ~/bashrc_add ] &&" ~/.bashrc ;then
sed -i -e '/\\[ -f ~/bashrc_add \\] &&/d' ~/.bashrc
fi
sed -e '/^if \[ -f ~\/bashrc_add \] /d' ~/.bashrc
sed -i -e '/#MYSHELLCONFIG-start/,/#MYSHELLCONFIG-end/d' ~/.bashrc
echo
#printf "%s" "[ -f bashrc_add ] && . bashrc_add" | tee -a ~/.bashrc