Skip to content

Instantly share code, notes, and snippets.

@noboru-i
Forked from sonots/dotfiles.sh
Last active December 19, 2015 04:59
Show Gist options
  • Select an option

  • Save noboru-i/5901503 to your computer and use it in GitHub Desktop.

Select an option

Save noboru-i/5901503 to your computer and use it in GitHub Desktop.
#!/bin/sh
[[ -e ~/.dotfiles ]] || git clone https://github.com/noboru-i/.dotfiles.git ~/.dotfiles
pushd ~/.dotfiles
git submodule init
git submodule update
for i in `ls -a`
do
[ $i = "." ] && continue
[ $i = ".." ] && continue
[ $i = ".git" ] && continue
[ $i = ".gitignore" ] && continue
[ $i = ".gitmodules" ] && continue
[ $i = "README.md" ] && continue
! [[ -e ~/$i ]] || mv ~/$i ~/$i.back.`date +%s`
ln -s ~/.dotfiles/$i ~/
done
vim -c ':BundleInstall!' -c ':q!' -c ':q!'
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment