#!/bin/sh RED='\033[1;31m' YELLOW='\033[1;33m' GREEN='\033[1;32m' CYAN='\033[1;36m' NC='\033[0m' info() { echo -e "${CYAN}$1${NC}" } warn() { echo -e "${YELLOW}$1${NC}" } error() { echo -e "${RED}$1${NC}" echo "See bootstrap.log for details" exit 1 } success() { echo -e "${GREEN}$1${NC}" } echo "Boostrap starting..." >> bootstrap.log # Fish configuration info "Checking for fish shell..." which fish 2> /dev/null fish_found=$? if [ $fish_found -eq 0 ]; then echo -e "\nFish installation" >> bootstrap.log info " -> Installing virtualfish..." pip install --user virtualfish >> boostrap.log 2>&1 || error "!! Failed to install virtualfish" info " -> Installing oh-my-fish..." curl -L https://get.oh-my.fish > install 2>> bootstrap.log || error "!! Failed to download oh-my-fish installer" curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install.sha256 > install.sha256 2>> bootstrap.log || error "!! Failed to download oh-my-fish checksum" sha256sum -c install.sha256 >> bootstrap.log 2>&1 || error "!! Checksum failed for oh-my-fish." fish install --noninteractive >> bootstrap.log 2>&1 ret=$? if [ $ret -eq 2 ]; then warn " -> Oh-my-fish already installed, not reinstalling." elif [ $ret -eq 0 ]; then success " -> Oh-my-fish installed." else error " -> !! Install failed for oh-my-fish." fi rm install install.sha256 fish -c 'omf install' >> bootstrap.log 2>&1 || error "!! Oh-my-fish failed to install some packages" success "Successfully configured fish" else warn "No fish shell available, skipping." fi # nvim config info "Checking for nvim..." which nvim 2> /dev/null nvim_found=$? if [ $nvim_found -eq 0 ]; then echo -e "\nNvim installation" >> bootstrap.log info " -> Setting up plugins..." curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim 2>> bootstrap.log nvim +PlugInstall +qall else warn "Nvim not available, skipping." fi