add development environment base script

This commit is contained in:
Ray Elliott 2020-09-04 17:25:34 +01:00
parent 1d609af550
commit b179e15f47
1 changed files with 61 additions and 0 deletions

View File

@ -0,0 +1,61 @@
#!/bin/sh
_home_dir="/home/$user"
ssh -T $ssh << EOSSH
echo "Installing packages .."
apt-get -y install curl gnupg2 ninja-build gettext libtool libtool-bin autoconf automake cmake g++ pkg-config unzip python-pip python3-pip fzf
echo "Installing lazygit .."
curl -fsSL https://github.com/jesseduffield/lazygit/releases/download/v0.22.1/lazygit_0.22.1_Linux_x86_64.tar.gz --output /tmp/lazygit.tar.gz
tar xf /tmp/lazygit.tar.gz -C /usr/local/bin/
rm /tmp/lazygit.tar.gz
echo "Installing lf ..."
curl -fsSL https://github.com/gokcehan/lf/releases/download/r16/lf-linux-amd64.tar.gz --output /tmp/lf.tar.gz
tar xf /tmp/lf.tar.gz -C /usr/local/bin/
rm /tmp/lf.tar.gz
echo "Installing neovim ..."
git clone https://github.com/neovim/neovim /tmp/neovim
cd /tmp/neovim
make CMAKE_BUILD_TYPE=Release
make install
su "$user"
echo "Installing nvm ..."
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
echo 'export NVM_DIR="\$HOME/.nvm"' >> "$_home_dir/.profile"
echo '[ -s "\$NVM_DIR/nvm.sh" ] && \. "\$NVM_DIR/nvm.sh"' >> "$_home_dir/.profile"
exit
su --login "$user"
. ./.profile
nvm install --lts --latest-npm
exit
su --login "$user"
. ./.profile
echo "Configuring neovim ..."
npm install -g neovim
python2 -m pip install --user --upgrade pynvim
python3 -m pip install --user --upgrade pynvim
python3 -m pip install --user --upgrade neovim-remote
git clone https://git.rayelliott.dev/dots/nvim.git $_home_dir/.config/nvim
curl -fLo $_home_dir/.config/nvim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
nvim --headless +PlugInstall +qall
# TODO wakatime api key
echo "Configuring lf .."
lf config
if [ -e "$_home_dir/.config/lf" ] ; then
mv "$_home_dir/.config/lf" "$_home_dir/.config/lf-original-$(date +%s)"
fi
git clone https://git.rayelliott.dev/dots/lf.git "$_home_dir/.config/lf"
EOSSH