From c067097077ca00f7add496253469ed31fe7f49f7 Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Sat, 15 Mar 2025 01:15:06 -0400 Subject: [PATCH] AutoYADM commit: 2025-03-15 01:15:06 --- .config/yadm/bootstrap-in-dir.sh | 29 +++++++++++++++++++ .config/yadm/bootstrap.d/strap.sh | 17 +++++++++++ .config/yadm/encrypt | 0 .../custom-shell.yazi/yazi_cmd_history | 2 ++ 4 files changed, 48 insertions(+) create mode 100755 .config/yadm/bootstrap-in-dir.sh create mode 100755 .config/yadm/bootstrap.d/strap.sh create mode 100644 .config/yadm/encrypt diff --git a/.config/yadm/bootstrap-in-dir.sh b/.config/yadm/bootstrap-in-dir.sh new file mode 100755 index 00000000..1af1943b --- /dev/null +++ b/.config/yadm/bootstrap-in-dir.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# Save this file as ~/.config/yadm/bootstrap and make it executable. It will +# execute all executable files (excluding templates and editor backups) in the +# ~/.config/yadm/bootstrap.d directory when run. + +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 + +declare -a bootstraps +while IFS= read -r bootstrap; do + if [[ -x "$bootstrap" && ! "$bootstrap" =~ "##" && ! "$bootstrap" =~ ~$ ]]; then + bootstraps+=("$bootstrap") + fi +done < <(find -L "$BOOTSTRAP_D" -type f | sort) + +for bootstrap in "${bootstraps[@]}"; do + if ! "$bootstrap"; then + echo "Error: bootstrap '$bootstrap' failed" >&2 + exit 1 + fi +done diff --git a/.config/yadm/bootstrap.d/strap.sh b/.config/yadm/bootstrap.d/strap.sh new file mode 100755 index 00000000..d05b2d2b --- /dev/null +++ b/.config/yadm/bootstrap.d/strap.sh @@ -0,0 +1,17 @@ +#!/bin/env bash + +# install paru + +sudo pacman -S --needed base-devel +git clone https://aur.archlinux.org/paru.git +cd paru || exit 1 +makepkg -si +cd .. || exit 1 +rm -r paru + +# Sync, update +paru -Syyu +paru --gendb +paru -S zsh +sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" +paru -S go rustup aerc isync cyrus-ssl-xoauth2 notmuch w3m ugrep w3m aerc bat btop cava clipcat waybar-cava direnv dunst eza fish foot fuzzel harper helix-git lazygit niri television tmux vesktop-bin zathura starship diff --git a/.config/yadm/encrypt b/.config/yadm/encrypt new file mode 100644 index 00000000..e69de29b diff --git a/.config/yazi/plugins/custom-shell.yazi/yazi_cmd_history b/.config/yazi/plugins/custom-shell.yazi/yazi_cmd_history index 5fe0e0ed..92418844 100644 --- a/.config/yazi/plugins/custom-shell.yazi/yazi_cmd_history +++ b/.config/yazi/plugins/custom-shell.yazi/yazi_cmd_history @@ -1,3 +1,5 @@ zsh -ic 'lg;exit' zsh -ic 'chmod +x get_git_provider_url.fish;exit' zsh -ic 'mksh abook;exit' +zsh -ic 'mksh bootstrap-in-dir;exit' +zsh -ic 'mksh strap;exit'