summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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