chore: remove bootstrap

This commit is contained in:
Ted Kulp
2023-10-14 23:48:38 -04:00
parent 365318c893
commit 8797e50a6b
-118
View File
@@ -14,124 +14,6 @@ if [ ! -f "$HOME/.tmux.conf" ]; then
ln -s -f .tmux/.tmux.conf
fi
# Create $GOHOME if necessary
if [ ! -d "$HOME/go" ]; then
mkdir $HOME/go
fi
# Update our origin URL to the git version now that we have
# our ssh config stuff downloaded
echo "Updating the yadm repo origin URL"
yadm remote set-url origin "git@github.com:tedkulp/dotfiles.git"
# Mac Specifics
if [ "$system_type" = "Darwin" ]; then
# Install Homebrew if it's missing
if ! command -v brew >/dev/null 2>&1; then
echo "Installing homebrew"
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# Install all the stuff in Brewfile (get comfortable... have some coffee or adult beverage)
if [ -f "$HOME/.Brewfile" ]; then
echo "Updating homebrew bundle"
brew bundle --global
fi
fi
# Linux Specifics
if [ "$system_type" = "Linux" ]; then
# Install apt stuff
sudo apt update -y
sudo apt upgrade -y
sudo apt install -y zsh software-properties-common python-dev python3-dev python3-pip urlview apt-transport-https keychain
# Install node if necessary
if ! command -v node >/dev/null 2>&1; then
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm install node
fi
# Install rust and cargo in necessary
if ! command -v cargo >/dev/null 2>&1; then
curl https://sh.rustup.rs -sSf > rustup-init.sh
chmod 755 rustup-init.sh
./rustup-init.sh -y
rm rustup-init.sh
fi
# Install neovim if necessary
if ! command -v nvim >/dev/null 2>&1; then
sudo add-apt-repository ppa:neovim-ppa/unstable -y
sudo apt-get update -y
sudo apt-get install neovim -y
fi
# Install lunarvim
if ! command -v lvim >/dev/null 2>&1; then
. $HOME/.cargo/env
bash <(curl -s https://raw.githubusercontent.com/lunarvim/lunarvim/master/utils/installer/install.sh)
yadm checkout $HOME/.config/lvim/config.lua # We want our version
$HOME/.local/bin/lvim +PackerSync
fi
# Install fzf if necessary
if ! command -v fzf >/dev/null 2>&1; then
git clone --depth 1 https://github.com/junegunn/fzf.git $HOME/.fzf
$HOME/.fzf/install --bin --no-key-bindings --no-completion --no-update-rc
fi
# Install go if necessary
if ! command -v go >/dev/null 2>&1; then
curl -sLk https://git.io/gobrew | sh -
export PATH="$HOME/.gobrew/current/bin:$HOME/.gobrew/bin:$PATH"
export GOPATH="$HOME/.gobrew/current/go"
gobrew use 1.17
fi
# Install nvm if necessary
if [ ! -d "$HOME/.nvm" ]; then
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
yadm checkout ~/.zshrc # nvm adds stuff that is already in ~/.config/zsh/nvm.zsh
fi
# Install starship if necessary
if ! command -v starship >/dev/null 2>&1; then
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
fi
# Install docker if necessary
if ! command -v docker >/dev/null 2>&1; then
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update -y
sudo apt-get install docker-ce docker-ce-cli containerd.io -y
sudo usermod -aG docker $USER
sudo systemctl enable docker.service
sudo systemctl enable containerd.service
fi
# Install lazygit if necessary
if ! command -v lazygit >/dev/null 2>&1; then
sudo add-apt-repository ppa:lazygit-team/release -y
sudo apt-get update -y
sudo apt-get install lazygit -y
fi
fi
# Oh My ZSH
if [ ! -d "$HOME/.oh-my-zsh" ]; then
echo "Installing oh-my-zsh. Install zsh as default, but then exit out to continue."
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
git clone https://github.com/agkozak/zsh-z $HOME/.config/zsh/plugins/zsh-z
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $HOME/.config/zsh/plugins/zsh-syntax-highlighting
yadm checkout $HOME/.zshrc # We want our version
fi
# Wrapping up
echo "Don't forget to run yadm decrypt!"
exit 0