Last active
March 3, 2021 03:53
-
-
Save cigrainger/0b863f4ee1eb0c2510166da5fc2f6964 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
# install dependencies | |
sudo add-apt-repository ppa:neovim-ppa/stable | |
sudo add-apt-repository ppa:lazygit-team/release | |
sudo apt-get update | |
sudo apt-get install -y git \ | |
curl \ | |
zsh \ | |
direnv \ | |
editorconfig \ | |
markdown \ | |
cmake \ | |
jq \ | |
shellcheck \ | |
neovim \ | |
lazygit | |
# use zsh (needs to be before fzf) | |
sudo chsh -s $(which zsh) chris | |
# pull dotfiles | |
git clone --bare https://github.com/cigrainger/cfg.git $HOME/.cfg | |
function config { | |
/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME $@ | |
} | |
mkdir -p .config-backup | |
config checkout | |
if [ $? = 0 ]; then | |
echo "Checked out config."; | |
else | |
echo "Backing up pre-existing dot files."; | |
config checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv {} .config-backup/{} | |
fi; | |
config checkout | |
config config status.showUntrackedFiles no | |
# switch to zsh | |
exec zsh | |
# install fd | |
curl -LO https://github.com/sharkdp/fd/releases/download/v8.2.1/fd_8.2.1_amd64.deb | |
sudo dpkg -i fd_8.2.1_amd64.deb | |
rm fd_8.2.1_amd64.deb | |
# install ripgrep | |
curl -LO https://github.com/BurntSushi/ripgrep/releases/download/12.1.1/ripgrep_12.1.1_amd64.deb | |
sudo dpkg -i ripgrep_12.1.1_amd64.deb | |
rm ripgrep_12.1.1_amd64.deb | |
# install fzf | |
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf | |
yes | ~/.fzf/install | |
# install asdf | |
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.8.0 | |
# install nodejs (necessary for coc.nvim) | |
asdf plugin-add nodejs https://github.com/asdf-vm/asdf-nodejs.git | |
bash -c '${ASDF_DATA_DIR:=$HOME/.asdf}/plugins/nodejs/bin/import-release-team-keyring' | |
asdf install nodejs 14.15.5 | |
asdf global nodejs 14.15.5 | |
# install vim-plug | |
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \ | |
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' | |
nvim --headless +PlugInstall +qall | |
# install tpm | |
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment