#!/bin/bash
# starship
mkdir -p $HOME/.local/bin && curl -sS https://starship.rs/install.sh | sudo -E sh -s -- --yes --bin-dir $HOME/.local/bin
# pfetch
curl -L https://github.com/Gobidev/pfetch-rs/releases/latest/download/pfetch-linux-gnu-x86_64.tar.gz | sudo tar -xvz -C /usr/local/bin/
# Go
sudo rm -rf /usr/local/go || sudo mkdir -p /usr/local/go && curl -L https://go.dev/dl/go1.20.5.linux-amd64.tar.gz | sudo tar -xvz -C /usr/local/
go install github.com/gopherdata/gophernotes@v0.7.5
mkdir -p ~/.local/share/jupyter/kernels/gophernotes
cd ~/.local/share/jupyter/kernels/gophernotes
cp "$(go env GOPATH)"/pkg/mod/github.com/gopherdata/gophernotes@v0.7.5/kernel/*.json.in "."
chmod +w ./kernel.json* # in case copied kernel.json has no write permission
sed "s|gophernotes|$(go env GOPATH)/bin/gophernotes|" < kernel.json.in > kernel.json
cd ~/
# dotnet
curl -L https://dot.net/v1/dotnet-install.sh | sudo bash -s -- --channel LTS --install-dir /usr/local/dotnet
curl -L https://dot.net/v1/dotnet-install.sh | sudo bash -s -- --channel STS --install-dir /usr/local/dotnet
if $(which dnf 2>&1 > /dev/null); then
sudo dnf config-manager --add-repo https://rpm.releases.hashicorp.com/fedora/hashicorp.repo
sudo dnf install -y \
zoxide \
terraform \
fontawesome-fonts \
fontawesome5-free-fonts
fi
# Git
cp home/config/git/gitconfig ~/.gitconfig
# ZSH
cp home/zshrc ~/.zshrc
mkdir -p ~/.config/zsh
rsync -avz home/config/zsh/ ~/.config/zsh
# Starship
cp home/config/starship.toml ~/.config/