From 44da1c8b92a1fc5f8f7e86d89a6236841cd3d4e9 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Wed, 7 Jun 2023 15:28:48 +0200 Subject: [PATCH] :recycle: add install script for codespaces --- install.sh | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 install.sh diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..8d677d8 --- /dev/null +++ b/install.sh @@ -0,0 +1,44 @@ +#!/bin/sh +# setup script for codespaces inspired by dcreager/dotfiles + +if [ -z "$USER" ]; then + USER=$(id -un) +fi + +echo >&2 "=====================================================================" +echo >&2 " Setting up codespaces environment" +echo >&2 "" +echo >&2 " USER $USER" +echo >&2 " HOME $HOME" +echo >&2 "=====================================================================" + +cd $HOME + +# Make passwordless sudo work +export SUDO_ASKPASS=/bin/true + +# No thank you +rm -rf .oh-my-bash +rm -rf .oh-my-zsh +rm .zshrc + +# A bit of a hack +# mv .gitconfig .gitconfig.private + +# git clone https://github.com/dcreager/dotfiles-base .dotfiles.base +# git clone https://github.com/dcreager/dotfiles-public -b codespaces --recurse-submodules .dotfiles.public +# $HOME/.dotfiles.base/bin/dotfiles.symlink install + +# I'd like to use fish, please +sudo apt-get install -y fish +sudo chsh -s /usr/bin/fish $USER + +# Install fzf +FZF_VERSION=0.40.0 +curl -L https://github.com/junegunn/fzf/releases/download/${FZF_VERSION}/fzf-${FZF_VERSION}-linux_amd64.tar.gz | tar xzC $HOME/bin + +# Install neovim +NVIM_VERSION=0.7.2 +sudo apt-get install -y libfuse2 +curl -L -o $HOME/bin/nvim https://github.com/neovim/neovim/releases/download/v${NVIM_VERSION}/nvim.appimage +chmod a+x $HOME/bin/nvim