dotfiles/install.sh

47 lines
1.6 KiB
Bash
Raw Normal View History

2019-03-25 09:28:39 +00:00
#!/bin/bash
2019-03-25 12:58:16 +00:00
BASE=$HOME/.dotfiles
2019-03-25 13:04:20 +00:00
if [ ! -d "$BASE" ]; then
git clone https://github.com/sundowndev/dotfiles $BASE
2019-03-25 13:07:25 +00:00
else
echo "dotfiles already installed"
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-03-25 09:28:39 +00:00
# mac
2019-03-25 13:04:20 +00:00
if [ -z "$(which brew)" ]; then
2019-03-25 12:58:16 +00:00
echo "detected mac os"
#brew install git vim wget fzf tree tmux graphviz transmission bash-completion reattach-to-user-namespace
#brew cask install virtualbox virtualbox-extension-pack vagrant flux spectacle iterm2
2019-03-25 09:28:39 +00:00
# [ -f /usr/local/etc/bash_completion.d/git-completion.bash ] || \
# wget https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -P \
# /usr/local/etc/bash_completion.d/
else
# linux
2019-03-25 12:58:16 +00:00
echo "detected linux os"
#sudo apt install -y git vim tmux wget transmission virtualbox virtualbox-ext-pack
#git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
#sudo -y ~/.fzf/install
2019-03-25 09:28:39 +00:00
# [ -f /etc/bash_completion.d/git-completion.bash ] || \
# sudo wget https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -P \
# /etc/bash_completion.d/
fi
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