From b21a2f84689d5074acef910963277ba6aec0af84 Mon Sep 17 00:00:00 2001 From: Tobias Schmidl Date: Fri, 13 Jul 2018 09:37:27 +0200 Subject: [PATCH] --- bootstrap.sh | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index f44a9a0..33e159e 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,28 +1,25 @@ #! /bin/sh -sudo -S bash -c "apt install bash-completion elinks git zsh curl neovim fortunes fortunes-de fortunes-debian-hints fortunes-off cowsay byobu command-not-found apt-file htop python3-venv python3 locales man mc cmake clang build-essential libpython-dev libpython3-dev && \ +sudo -S bash -c "apt install bash-completion elinks git zsh curl neovim byobu command-not-found apt-file htop python3-venv python3 locales man mc cmake clang build-essential libpython-dev libpython3-dev && \ apt-file update && \ update-command-not-found" +# clone the entire environment from github +TMPDIR=$(mktemp -u -p "$HOME" -d dotfiles.XXXXX) +git clone --separate-git-dir="$HOME/.cfg" https://github.com/schtobia/dotfiles.git "$TMPDIR" +[ -r "$TMPDIR/.gitmodules" ] && cp -vi "$TMPDIR/.gitmodules" "$HOME" +git --git-dir="$HOME/.cfg/" --work-tree="$HOME" config status.showUntrackedFiles no +(cd $HOME && git --git-dir="$HOME/.cfg/" --work-tree="$HOME" checkout -- .) +rm -r $TMPDIR + # node related curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash - sudo apt-get install -y nodejs # python3 related -sudo -S bash -c "curl --tlsv1.2 -RLfs https://bootstrap.pypa.io/get-pip.py | python2 &&\ - curl --tlsv1.2 -RLfs https://bootstrap.pypa.io/get-pip.py | python3" +sudo -S bash -c "curl -RLfs https://bootstrap.pypa.io/get-pip.py | python2 &&\ + curl -RLfs https://bootstrap.pypa.io/get-pip.py | python3" # vim related -mkdir -p $HOME/.vim/autoload $HOME/.vim/bundle $HOME/.config/nvim && \ - git clone https://github.com/VundleVim/Vundle.vim.git $HOME/.vim/bundle/Vundle.vim && \ - curl -RLSso $HOME/.vimrc https://github.com/schtobia/systemsettings/raw/master/vimrc && \ - curl -RLSso $HOME/.config/nvim/init.vim https://github.com/schtobia/systemsettings/raw/master/init.vim && \ +pip install --user neovim && nvim +PluginInstall +qall && \ (cd $HOME/.vim/bundle/YouCompleteMe && ./install.py --clang-completer --js-completer --system-libclang) - -# zsh related -mkdir -p $HOME/.local/lib/zsh/custom-zsh && - git clone https://github.com/zsh-users/antigen.git $HOME/.local/lib/zsh/antigen && - curl -RLSso $HOME/.zshrc https://github.com/schtobia/systemsettings/raw/master/zshrc - -#git related -curl -RLSso $HOME/.gitconfig https://github.com/schtobia/systemsettings/raw/master/gitconfig