fix path, do not remove ~/bashrc_add

This commit is contained in:
Jakobus Schürz 2020-01-15 02:03:36 +01:00
parent 37a033f4a2
commit f87156db6f

View file

@ -223,7 +223,7 @@ sshmyshellconfig() {
CMD=""
else
local SSH="/usr/bin/ssh"
[ -e ${MYSHELLCONFIG_BASE}/bashrc_add ] && $SSH -T -o VisualHostKey=no $@ "mkdir -p ~/${MYSHELLCONFIG_BASE_PARENT}; cat > ~/${MYSHELLCONFIG_SUBPATH}/bashrc_add" < "${MYSHELLCONFIG_BASE}/bashrc_add"
[ -e ${MYSHELLCONFIG_BASE}/bashrc_add ] && $SSH -T -o VisualHostKey=no $@ "mkdir -p ~/bashrc_add; cat > ~/${MYSHELLCONFIG_SUBPATH}/bashrc_add" < "${MYSHELLCONFIG_BASE}/bashrc_add"
local CMD="$SSH -T $@"
fi
$CMD /bin/bash << EOF
@ -237,7 +237,6 @@ sshmyshellconfig() {
printf "%s\n" "#MYSHELLCONFIG-start" "if [ -e \${HOME}/${MYSHELLCONFIG_SUBPATH}/bashrc_add ]; then" " . \${HOME}/${MYSHELLCONFIG_SUBPATH}/bashrc_add;" "else" " if [ -f ~/bashrc_add ] ;then" " . ~/bashrc_add;" " fi;" "fi" "#MYSHELLCONFIG-end" |tee -a ~/.bashrc
echo
echo cleanup from old config
rm ~/bashrc_add && echo rm ~/bashrc_add
rm -rf ~/server-config && echo rm -rf ~/server-config
EOF