Created
April 27, 2018 14:52
-
-
Save kmhofmann/569f3de139e3fffe5dfb6307afae6c2a to your computer and use it in GitHub Desktop.
A shell script to bootstrap tmux and nvim installation on Debian-like systems (e.g. RPi).
This file contains 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/env bash | |
# | |
# Bootstrapping some tools for Debian-like systems, | |
# e.g. Raspberry Pis running Raspbian, etc. | |
# | |
sudo apt-get install wget curl git build-essential python-pip python3-pip vim \ | |
cmake ninja-build libtool libtool-bin autoconf automake cmake g++ \ | |
pkg-config unzip texinfo libevent-dev libncurses-dev | |
mkdir -p $HOME/projects | |
git -C $HOME/projects clone https://github.com/kmhofmann/build_stuff.git | |
git -C $HOME/projects/build_stuff fetch | |
git -C $HOME/projects/build_stuff checkout master | |
git -C $HOME/projects clone https://github.com/kmhofmann/dotfiles.git | |
git -C $HOME/projects/dotfiles fetch | |
git -C $HOME/projects/build_stuff checkout master | |
# Build tmux | |
$HOME/projects/build_stuff/build_tmux.sh -s $HOME/devel -t $HOME/.local | |
if [[ ! -e "$HOME/projects/dotfiles/.tmux.conf"]]; then | |
cp $HOME/projects/dotfiles/.tmux.conf $HOME | |
fi | |
# Build neovim | |
$HOME/projects/build_stuff/build_neovim.sh -s $HOME/devel -t $HOME/.local | |
pip install --user --upgrade neovim | |
pip3 install --user --upgrade neovim | |
mkdir -p $HOME/.config/nvim | |
INIT_VIM=$HOME/.config/nvim/init.vim | |
echo "set runtimepath^=~/.vim runtimepath+=~/.vim/after" > ${INIT_VIM} | |
echo "let &packpath = &runtimepath" >> ${INIT_VIM} | |
echo "source ~/.vimrc" >> ${INIT_VIM} | |
if [[ ! -e "$HOME/projects/dotfiles/.vimrc"]]; then | |
cp $HOME/projects/dotfiles/.vimrc $HOME | |
fi | |
# Build CMake | |
#$HOME/projects/build_stuff/build_cmake.sh -s $HOME/devel -t $HOME/.local | |
# Update .profile | |
if [[ ! $(grep ".local" $HOME/.profile) ]]; then | |
echo "" >> $HOME/.profile | |
echo "export PATH=\$HOME/.local/bin:\$PATH" >> $HOME/.profile | |
fi | |
if [[ ! $(grep "alias vim" $HOME/.profile) ]]; then | |
echo "alias vim=nvim" >> $HOME/.profile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment