Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MOD: add deploy.sh for auto deploy vimrc config
- Loading branch information
cwgis
committed
Mar 19, 2013
1 parent
cbc85e2
commit 3407c9e
Showing
2 changed files
with
30 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/sh | ||
CURRENT_DIR=`pwd` | ||
[[ ! -e '~/.vimundodir']] || mkdir ~/.vimundodir | ||
rm -rf ~/.vimundodir/* | ||
|
||
#backup the .vimrc and .vim | ||
mv ~/.vim ~/.vimundodir/.vim | ||
mv ~/.vimrc ~/.vimundodir | ||
|
||
#checkout plugins | ||
git submodule init | ||
git submodule update | ||
|
||
#copy the current vimrc to `~/` directory | ||
cd ~/ | ||
cp -r "$CURRENT_DIR/vimrc" ~/.vimrc | ||
|
||
# make .vim directory under `~/` directory and copy current file to ~/.vim | ||
cp -r "$CURRENT_DIR" ~/.vim/ | ||
|
||
rm -rf "$CURRENT_DIR" | ||
exit |