Update install.sh

master
Raphael 2019-03-25 13:58:16 +01:00 committed by GitHub
parent d7ac2137b9
commit 4fca40945b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 21 additions and 24 deletions

View File

@ -1,45 +1,42 @@
#!/bin/bash #!/bin/bash
# author: zach rice (https://github.com/zricethezav)
BASE=$HOME/.dotfiles
git clone https://github.com/sundowndev/dotfiles $BASE
# links # links
BASE=$(pwd)
mkdir ${HOME}/.marks
ln -fs ${BASE}/bashrc ${HOME}/.bashrc ln -fs ${BASE}/bashrc ${HOME}/.bashrc
ln -fs ${BASE}/bash_profile ${HOME}/.bash_profile ln -fs ${BASE}/bash_profile ${HOME}/.bash_profile
ln -fs ${BASE}/bash_aliases ${HOME}/.bash_aliases ln -fs ${BASE}/bash_aliases ${HOME}/.bash_aliases
ln -fs ${BASE}/tmux.conf ${HOME}/.tmux.conf ln -fs ${BASE}/zshrc ${HOME}/.zshrc
ln -fs ${BASE}/gitignore ${HOME}/.gitignore
# mac # mac
if [ "$(uname -s)" = 'Darwin' ]; then if [ [ -z "$(which brew)" ] ]; then
[ -z "$(which brew)" ] && echo "detected mac os"
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" #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
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
# [ -f /usr/local/etc/bash_completion.d/git-completion.bash ] || \ # [ -f /usr/local/etc/bash_completion.d/git-completion.bash ] || \
# wget https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -P \ # wget https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -P \
# /usr/local/etc/bash_completion.d/ # /usr/local/etc/bash_completion.d/
else else
# linux # linux
sudo apt install -y git vim tmux wget transmission virtualbox virtualbox-ext-pack echo "detected linux os"
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf #sudo apt install -y git vim tmux wget transmission virtualbox virtualbox-ext-pack
sudo -y ~/.fzf/install #git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
#sudo -y ~/.fzf/install
# [ -f /etc/bash_completion.d/git-completion.bash ] || \ # [ -f /etc/bash_completion.d/git-completion.bash ] || \
# sudo wget https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -P \ # sudo wget https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -P \
# /etc/bash_completion.d/ # /etc/bash_completion.d/
fi fi
git config --global user.email "zricer@protonmail.com" git config --global user.email "raphael@crvx.fr"
git config --global user.name "zach rice" git config --global user.name "sundowndev"
# tmux
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
tmux source-file ~/.tmux.conf
# vim # vim
mkdir -p ~/.vim/autoload #mkdir -p ~/.vim/autoload
curl --insecure -fLo ~/.vim/autoload/plug.vim https://raw.github.com/junegunn/vim-plug/master/plug.vim #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 #mv -v ~/.vimrc ~/.vimrc.old 2> /dev/null
ln -sf $BASE/vimrc ~/.vimrc #ln -sf $BASE/vimrc ~/.vimrc
vim +PlugInstall +qall #vim +PlugInstall +qall