Skip to content

Commit

Permalink
optional vimconfig added
Browse files Browse the repository at this point in the history
  • Loading branch information
pylight committed Jan 3, 2012
1 parent 63dec28 commit e84efc1
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 22 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
@@ -0,0 +1,3 @@
[submodule "vim"]
path = vim
url = git://github.com/pylight/vimrc.git
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -9,12 +9,14 @@ The install.sh script will create symlinks in your Homedirectory for the followi
* tmux (~/.tmux.conf)
* conky (~/.conkyrc)
* urxvt (~/.Xdefaults)
* vim (~/.vimrc) - added as submodule from my [vim-repo](https://github.com/pylight/vimrc)

Make sure these files aren't availiable yet, otherwise they will be skipped with a warning.

```bash
git clone git://github.com/pylight/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
git submodule update --init
chmod +x install.sh
./install.sh -doinstall
```
Expand Down
41 changes: 19 additions & 22 deletions install.sh
Expand Up @@ -17,36 +17,20 @@ createSym()

deleteSyms()
{
lines=0
actions=0

cat .createdLinks | while read LINE
do
echo "=> Removing $LINE"
rm $LINE
if [ $? -eq 0 ]; then # rm successfull?
let actions++
fi
let line++
done

# rm infofile if all
# symlinks are removed
if [ "$lines" -eq "$actions" ]
then
rm .createdLinks
echo ""
echo "Done. To remove the whole folder, run:"
echo "cd ; rm -R $curDir"
echo ""
else
echo ""
echo "Error while trying to delete symlinks!"
echo "Please check your home directory and the .createdLinks-File manually."
echo ""
fi
rm .createdLinks
echo ""
echo "Done. To remove the whole folder, run:"
echo "cd ; rm -R $curDir"
echo ""
}


echo "== dotfiles install script =="

if [ "$1" == "-doinstall" ]
Expand All @@ -55,6 +39,19 @@ then
createSym tmux tmux.conf
createSym conky conkyrc
createSym urxvt Xdefaults

# vim (optional)
read -p "Also setup vim config (https://github.com/pylight/vimrc)? [y/N] " prompt
if [[ $prompt =~ [yY](es)* ]]
then
git submodule update --init
createSym vim vim
cd $HOME.vim
git submodule update --init
./install-vimrc.sh
cd $curDir
echo $HOME.vimrc >> .createdLinks
fi

elif [ "$1" == "-uninstall" ]
then
Expand Down
1 change: 1 addition & 0 deletions vim
Submodule vim added at b3938d

0 comments on commit e84efc1

Please sign in to comment.