2019-03-25 09:28:39 +00:00
|
|
|
#!/bin/bash
|
2019-03-25 12:58:16 +00:00
|
|
|
|
2019-05-13 18:28:35 +00:00
|
|
|
echo "==> running dotfiles install script"
|
|
|
|
|
2019-03-25 12:58:16 +00:00
|
|
|
BASE=$HOME/.dotfiles
|
|
|
|
|
2019-03-25 13:04:20 +00:00
|
|
|
if [ ! -d "$BASE" ]; then
|
2019-05-13 18:28:35 +00:00
|
|
|
echo "==> cloning git repository"
|
2019-05-13 17:44:04 +00:00
|
|
|
git clone git@github.com:sundowndev/dotfiles.git $BASE
|
2019-03-25 13:07:25 +00:00
|
|
|
else
|
2019-05-13 18:28:35 +00:00
|
|
|
echo "==> dotfiles already installed"
|
2019-05-14 10:20:35 +00:00
|
|
|
echo "==> running git pull origin master"
|
2019-05-13 18:28:35 +00:00
|
|
|
cd $BASE
|
2019-05-14 10:20:35 +00:00
|
|
|
git pull origin master
|
2019-03-25 13:04:20 +00:00
|
|
|
fi
|
2019-03-25 09:28:39 +00:00
|
|
|
|
|
|
|
# links
|
|
|
|
ln -fs ${BASE}/bashrc ${HOME}/.bashrc
|
|
|
|
ln -fs ${BASE}/bash_profile ${HOME}/.bash_profile
|
|
|
|
ln -fs ${BASE}/bash_aliases ${HOME}/.bash_aliases
|
2019-03-25 12:58:16 +00:00
|
|
|
ln -fs ${BASE}/zshrc ${HOME}/.zshrc
|
|
|
|
ln -fs ${BASE}/gitignore ${HOME}/.gitignore
|
2019-05-14 10:20:35 +00:00
|
|
|
|
2019-05-14 11:37:40 +00:00
|
|
|
if [ -f "${HOME}/.hyper.js" ]; then
|
2019-05-14 10:20:35 +00:00
|
|
|
ln -fs ${BASE}/hyper.js ${HOME}/.hyper.js
|
|
|
|
fi
|
|
|
|
|
2019-05-14 11:37:40 +00:00
|
|
|
if [ -f "${HOME}/.config/Code/User/settings.json" ]; then
|
2019-05-14 10:20:35 +00:00
|
|
|
ln -fs ${BASE}/vscode-settings.json ${HOME}/.config/Code/User/settings.json
|
|
|
|
fi
|
2019-03-25 09:28:39 +00:00
|
|
|
|
2019-03-25 12:58:16 +00:00
|
|
|
git config --global user.email "raphael@crvx.fr"
|
|
|
|
git config --global user.name "sundowndev"
|
2019-03-25 09:28:39 +00:00
|
|
|
|
|
|
|
# vim
|
2019-03-25 12:58:16 +00:00
|
|
|
#mkdir -p ~/.vim/autoload
|
|
|
|
#curl --insecure -fLo ~/.vim/autoload/plug.vim https://raw.github.com/junegunn/vim-plug/master/plug.vim
|
|
|
|
#mv -v ~/.vimrc ~/.vimrc.old 2> /dev/null
|
|
|
|
#ln -sf $BASE/vimrc ~/.vimrc
|
2019-03-25 09:28:39 +00:00
|
|
|
|
2019-03-25 12:58:16 +00:00
|
|
|
#vim +PlugInstall +qall
|
2019-05-13 18:28:35 +00:00
|
|
|
|
|
|
|
echo "==> script executed"
|