summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjohannst <stoelp@eit.uni-kl.de>2017-01-14 22:57:53 +0100
committerjohannst <stoelp@eit.uni-kl.de>2017-01-14 22:57:53 +0100
commited06e97323f671e875802b768fb014d6f1f1e87c (patch)
tree8df3bbd9716e721c4cf36f172e425762202cb20d
parent23b00a4a20dcaff8e4adb866ea53f92534c3e1f7 (diff)
downloaddotfiles-ed06e97323f671e875802b768fb014d6f1f1e87c.tar.gz
dotfiles-ed06e97323f671e875802b768fb014d6f1f1e87c.zip
implemented bashrc, vim and git installer
-rwxr-xr-xinstall40
-rw-r--r--vimrc2
2 files changed, 38 insertions, 4 deletions
diff --git a/install b/install
index 28a0fa2..78f050a 100755
--- a/install
+++ b/install
@@ -15,10 +15,21 @@ gToolsConfig=(
"Xresources:xterm:xtermConfigInstaller"
)
+gMagicNumber=e2718281
+ABS_BASE_DIR=$(readlink -f $(dirname $0))
+
#{{{ bashrcInstaller
function bashrcInstaller() {
- echo "bashInstaller called!"
+ local bashrc=~/.bashrc
+ touch $bashrc
+ grep $gMagicNumber $bashrc > /dev/null 2>&1
+ if [[ $? = 0 ]]; then
+ return
+ fi
+ echo -e "\n# $gMagicNumber - Auto generated, do not delete or modify!" >> $bashrc
+ echo -e "source $ABS_BASE_DIR/bashrc" >> $bashrc
+ echo "[Info]: bashrc sucessfully installed!"
}
#}}}
@@ -39,7 +50,16 @@ function conkyrcInstaller() {
#{{{ gitConfigInstaller
function gitConfigInstaller() {
- echo "gitConfigInstaller called"
+ local gitconf=~/.gitconfig
+ touch $gitconf
+ grep $gMagicNumber $gitconf > /dev/null 2>&1
+ if [[ $? = 0 ]]; then
+ return
+ fi
+ echo -e "\n# $gMagicNumber - Auto generated, do not delete or modify!" >> $gitconf
+ echo -e "[include]" >> $gitconf
+ echo -e " path = $ABS_BASE_DIR/gitconfig" >> $gitconf
+ echo "[Info]: gitconfig sucessfully installed!"
}
#}}}
@@ -53,7 +73,21 @@ function tmuxConfigInstaller() {
#{{{ vimConfigInstaller
function vimConfigInstaller() {
- echo "vimConfigInstaller called"
+ local vimrc=~/.vimrc
+ local vim_home=~/.vim
+ touch $vimrc
+ grep $gMagicNumber $vimrc > /dev/null 2>&1
+ if [[ $? = 0 ]]; then
+ return
+ fi
+ mkdir $vim_home > /dev/null 2>&1
+ ln -s $ABS_BASE_DIR/vim/* $vim_home
+ echo -e "\n\" $gMagicNumber - Auto generated, do not delete or modify!" >> $vimrc
+ echo -e "let \$VIMHOME='$vim_home'" >> $vimrc
+ echo -e "source $ABS_BASE_DIR/vimrc" >> $vimrc
+ git clone https://github.com/VundleVim/Vundle.vim.git $vim_home/bundle/Vundle.vim
+ vim +PluginInstall +qall
+ echo "[Info]: vim config sucessfully installed!"
}
#}}}
diff --git a/vimrc b/vimrc
index 7942b7c..e00f191 100644
--- a/vimrc
+++ b/vimrc
@@ -8,7 +8,7 @@ let mapleader=";"
nnoremap <leader>ev :edit ~/.vimrc<CR>
nnoremap <leader>sv :source ~/.vimrc<CR>
-let $VIMHOME='~/.vim'
+"let $VIMHOME='~/.vim'
"{{{ Plugin Management