fix escaping

This commit is contained in:
Jakobus Schürz 2020-01-15 01:26:48 +01:00
parent 356bdf09e2
commit 323da505ee

View file

@ -26,7 +26,7 @@ create_symlinks() {
ln -sf "${MYSHELLCONFIG_BASE}/vimrc" ~/.vimrc
ln -sf "${MYSHELLCONFIG_BASE}/vim" ~/.vim
ln -sf "${MYSHELLCONFIG_BASE}/.gitconfig" ~/.gitconfig
ln -sf "${MYSHELLCONFIG_BASE}/bashrc_add" ~/bashrc_add
#ln -sf "${MYSHELLCONFIG_BASE}/bashrc_add" ~/bashrc_add
ln -sf "${MYSHELLCONFIG_BASE}/tmux" ~/.tmux
ln -sf "${MYSHELLCONFIG_BASE}/tmux/tmux.conf" ~/.tmux.conf
@ -234,21 +234,13 @@ sshmyshellconfig() {
sed -i -e '/#MYSHELLCONFIG-start/,/#MYSHELLCONFIG-end/d' ~/.bashrc
echo
#printf "%s" "[ -f bashrc_add ] && . bashrc_add" | 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
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
EOF
}
transit2newconf() {
[ -z "${MYSHELLCONFIG_BASE+x}" ] && MYSHELLCONFIG_BASE=~/.local/myshellconfig
sshmyshellconfig localhost
echo rm ~/bashrc_add
rm ~/bashrc_add
exit
}
sshs() {
# MKTMPCMD='mktemp $(echo ${XDG_RUNTIME_DIR}/bashrc.XXXXXXXX.conf)'