summaryrefslogtreecommitdiffstats
path: root/satellit_installer
diff options
context:
space:
mode:
authorSimon Rettberg2018-03-29 15:37:15 +0200
committerSimon Rettberg2018-03-29 15:37:15 +0200
commit69319741e8113e6d242bb4a3b090ec36db0ee7f7 (patch)
tree94be8782d6c121a35db1c2bcc1ac71f86bc1f5d3 /satellit_installer
parent[SSUS] Add diffcp helper (diff)
downloadsetup-scripts-69319741e8113e6d242bb4a3b090ec36db0ee7f7.tar.gz
setup-scripts-69319741e8113e6d242bb4a3b090ec36db0ee7f7.tar.xz
setup-scripts-69319741e8113e6d242bb4a3b090ec36db0ee7f7.zip
[SSPS] Enable auto-indent for vim
Diffstat (limited to 'satellit_installer')
-rw-r--r--satellit_installer/includes/90-patch_misc_files.inc13
1 files changed, 6 insertions, 7 deletions
diff --git a/satellit_installer/includes/90-patch_misc_files.inc b/satellit_installer/includes/90-patch_misc_files.inc
index 4ef4ff5..9729a18 100644
--- a/satellit_installer/includes/90-patch_misc_files.inc
+++ b/satellit_installer/includes/90-patch_misc_files.inc
@@ -3,21 +3,20 @@ patch_bashrc() {
echo "# As one of the last things here we will set a new prompt to distinguish"
echo "# the beLehrpool satellite server from other servers. To accomplish this"
echo "# we will set a very classy prompt. This will take effect at next root login."
- echo -n "# Setting prompt..."
- if [ $(grep -c \
- 'PS1\=\"\\\[\\033\[01;31m\\\]\\u\\\[\\033\[00m\\\]@\\\[\\033\[01;32m\\\]\\h \\\[\\033\[01;34m\\\]\\w\\\[\\033\[00m\\\] # \"' \
- /root/.bashrc) -gt 0 ]; then
- echo " already done."
+ echo "# Setting prompt..."
+ if grep -q 'PS1=".*01;31m.*01;32m.*01;34m' /root/.bashrc; then
+ echo "...already done."
else
echo 'PS1="\[\033[01;31m\]\u\[\033[00m\]@\[\033[01;32m\]\h \[\033[01;34m\]\w\[\033[00m\] # "' >> /root/.bashrc
- echo " ok."
fi
# aliases, dircolors
sed -i -r 's/# *(alias|export LS|eval ")/\1/' /root/.bashrc
}
patch_vim() {
- sed -i -r 's/" *(syntax|set background|set showmatch|set smartcase|set incsearch)/\1/' /etc/vim/vimrc
+ sed -i -r 's/" *(syntax|set showmatch|set smartcase|set incsearch)/\1/' /etc/vim/vimrc
+ echo "set autoindent" >> /etc/vim/vimrc
+ echo "set smartindent" >> /etc/vim/vimrc
}
patch_ldapsearch() {