From e49b38a5abde643f9e4446a7121292975edc4bf6 Mon Sep 17 00:00:00 2001 From: Eric Renfro Date: Wed, 13 Mar 2024 17:26:09 -0400 Subject: [PATCH] Added bootstrapping for shell --- .config/yadm/bootstrap | 20 ++++++++++++++++++++ .config/yadm/bootstrap.d/shell | 20 ++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 .config/yadm/bootstrap create mode 100644 .config/yadm/bootstrap.d/shell diff --git a/.config/yadm/bootstrap b/.config/yadm/bootstrap new file mode 100644 index 0000000..d661ba7 --- /dev/null +++ b/.config/yadm/bootstrap @@ -0,0 +1,20 @@ +#!/bin/bash + +set -eu + +# Directory to look for bootstrap executables in +BOOTSTRAP_D="${BASH_SOURCE[0]}.d" + +if [[ ! -d "$BOOTSTRAP_D" ]]; then + echo "Error: bootstrap directory '$BOOTSTRAP_D' not found" >&2 + exit 1 +fi + +find "$BOOTSTRAP_D" -type f | sort | while IFS= read -r bootstrap; do + if [[ -x "$bootstrap" && ! "$bootstrap" =~ "##" && ! "$bootstrap" =~ "~$" ]]; then + if ! "$bootstrap"; then + echo "Error: bootstrap '$bootstrap' failed" >&2 + exit 1 + fi + fi +done diff --git a/.config/yadm/bootstrap.d/shell b/.config/yadm/bootstrap.d/shell new file mode 100644 index 0000000..db2bfa2 --- /dev/null +++ b/.config/yadm/bootstrap.d/shell @@ -0,0 +1,20 @@ +#!/bin/bash + +if [[ ! -r "$HOME/.local/share/blesh/ble.sh" ]]; then + echo "+ ble.sh" + git clone --recursive --depth 1 --shallow-submodules https://github.com/akinomyoga/ble.sh.github + make -C ble.sh install PREFIX="$HOME/.local" + rm -rf ble.sh +fi + +if [[ ! -d "$HOME/.tmux/plugins" ]]; then + echo "+ TMux Plugin Manager" + mkdir -p "$HOME/.tmux/plugins" + git clone https://github.com/tmux-plugins/tpm "$HOME/.tmux/plugins/tpm" +fi + +if [[ ! -d "$HOME/.config/nvim" ]]; then + echo "+ NvChad" + git clone https://github.com/NvChad/starter ~/.config/nvim + echo "! Run :MasonInstallAll while running nvim to finish NvChat install" +fi