summaryrefslogtreecommitdiff
path: root/install
diff options
context:
space:
mode:
authorjohannst <stoelp@eit.uni-kl.de>2017-04-02 12:10:50 +0200
committerjohannst <stoelp@eit.uni-kl.de>2017-04-02 12:10:50 +0200
commit3bb672283f1163fd1d7cccb6746fffbc49c0c007 (patch)
treed0840081a60ad880aad07558a788a19d991debf9 /install
parent75e72bfaddb16c6b9deb89c8b76a4267ee8c9436 (diff)
parent8930c50b8d38b3ea909230f728296fac63853a72 (diff)
downloaddotfiles-3bb672283f1163fd1d7cccb6746fffbc49c0c007.tar.gz
dotfiles-3bb672283f1163fd1d7cccb6746fffbc49c0c007.zip
merged changes into mainstream
Diffstat (limited to 'install')
-rwxr-xr-xinstall26
1 files changed, 17 insertions, 9 deletions
diff --git a/install b/install
index d47c33e..a6f18c8 100755
--- a/install
+++ b/install
@@ -26,11 +26,11 @@ function bashrcInstaller() {
touch $bashrc
grep $gMagicNumber $bashrc > /dev/null 2>&1
if [[ $? = 0 ]]; then
- return
+ return 1
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!"
+ return 0
}
#}}}
@@ -69,19 +69,21 @@ function gitConfigInstaller() {
touch $gitconf
grep $gMagicNumber $gitconf > /dev/null 2>&1
if [[ $? = 0 ]]; then
- return
+ return 1
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!"
+ return 0
}
#}}}
#{{{ tmuxConfigInstaller
function tmuxConfigInstaller() {
- echo "tmuxConfigInstaller called"
+ local tmuxconf=~/.tmux.conf
+ ln -s $ABS_BASE_DIR/tmux.conf $tmuxconf
+ return 0
}
#}}}
@@ -93,16 +95,17 @@ function vimConfigInstaller() {
touch $vimrc
grep $gMagicNumber $vimrc > /dev/null 2>&1
if [[ $? = 0 ]]; then
- return
+ return 1
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 \$MYVIMRC='$ABS_BASE_DIR/vimrc'" >> $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!"
+ return 0
}
#}}}
@@ -148,12 +151,12 @@ installConfig() {
local binary=$(getDepenentBinaryName $config)
isBinaryInstalled $binary
if [[ $? -eq 1 ]]; then
- echo "[Warning]: Skipping $config... $config is not installed!"
+ echo "[Warning]: Skipping $config... $binary is not installed!"
return
fi
local installerFctPtr=$(getConfigInstallerFctPtr $config)
if [[ -z $installerFctPtr ]]; then
- echo "[Warning]: Skipping $config... installer function pointer loopup error!"
+ echo "[Warning]: Skipping $config... installer function pointer lookup error!"
return
fi
isInstallerDefined $installerFctPtr
@@ -163,6 +166,11 @@ installConfig() {
fi
echo "[Info]: Intalling config for $binary using $installerFctPtr!"
$installerFctPtr
+ if [[ $? -eq 1 ]]; then
+ echo "[Info]: $config already installed!"
+ return
+ fi
+ echo "[Info]: $config sucessfully installed!"
}
getValue() {