change modification of ~/.bashrc

This commit is contained in:
Jakobus Schürz 2020-01-14 14:01:05 +01:00
parent 50e9a9a14f
commit 6737f6f5dd
2 changed files with 3 additions and 1 deletions

1
.gitignore vendored
View file

@ -2,6 +2,7 @@ vim/.netrwhist
vim/.VimballRecord vim/.VimballRecord
vim/bundle/* vim/bundle/*
!vim/bundle/Vundle.vim !vim/bundle/Vundle.vim
logs
*.log *.log
*.swp *.swp
*.orig *.orig

View file

@ -231,9 +231,10 @@ sshmyshellconfig() {
if grep -q bashrc_add ~/.bashrc ;then if grep -q bashrc_add ~/.bashrc ;then
sed -i -e '/bashrc_add/d' ~/.bashrc sed -i -e '/bashrc_add/d' ~/.bashrc
fi fi
sed -i -e '/#MYSHELLCONFIG-start/,/#MYSHELLCONFIG-end/d' ~/.bashrc
echo echo
#printf "%s" "[ -f bashrc_add ] && . bashrc_add" | tee -a ~/.bashrc #printf "%s" "[ -f bashrc_add ] && . bashrc_add" | tee -a ~/.bashrc
printf "%s" "if [ -e \\${MYSHELLCONFIG_BASE}/bashrc_add ]; then \n . \\${MYSHELLCONFIG_BASE}/bashrc_add;\nelse\n if [ -f bashrc_add ] ;then \n . bashrc_add;\n fi;\nfi" |tee -a ~/.bashrc printf "%s\n" "#MYSHELLCONFIG-start" "if [ -e \\\${MYSHELLCONFIG_BASE}/bashrc_add ]; then" " . \\\${MYSHELLCONFIG_BASE}/bashrc_add;" "else" " if [ -f ~/bashrc_add ] ;then" " . ~/bashrc_add;" " fi;" "fi" "#MYSHELLCONFIG-end" |tee -a ~/.bashrc
echo echo
EOF EOF