Overhauled bootstrap files
This commit is contained in:
parent
abed723ceb
commit
52ad4a6b19
8 changed files with 26 additions and 3 deletions
|
|
@ -4,6 +4,29 @@
|
|||
# execute all executable files (excluding templates and editor backups) in the
|
||||
# ~/.config/yadm/bootstrap.d directory when run.
|
||||
|
||||
_repeat() {
|
||||
local start=1
|
||||
local end=${1:-80}
|
||||
local str="${2:-=}"
|
||||
local range=$(seq $start $end)
|
||||
for i in $range; do echo -n "${str}"; done
|
||||
}
|
||||
|
||||
display() {
|
||||
local value="$1"
|
||||
echo -n "/="
|
||||
_repeat ${#value} "="
|
||||
echo "=\\"
|
||||
|
||||
echo -n "| "
|
||||
echo -n ${value}
|
||||
echo " |"
|
||||
|
||||
echo -n "\\="
|
||||
_repeat ${#value} "="
|
||||
echo "=/"
|
||||
}
|
||||
|
||||
set -eu
|
||||
|
||||
# Directory to look for bootstrap executables in
|
||||
|
|
@ -22,11 +45,11 @@ while IFS= read -r bootstrap; do
|
|||
done < <(find -L "$BOOTSTRAP_D" -type f | sort)
|
||||
|
||||
for bootstrap in "${bootstraps[@]}"; do
|
||||
echo "----------------------------"
|
||||
echo "# Executing $bootstrap"
|
||||
display "Executing $bootstrap"
|
||||
|
||||
if ! "$bootstrap"; then
|
||||
echo "Error: bootstrap '$bootstrap' failed" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
display "Bootstrap completed"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ echo "Installing general apps"
|
|||
|
||||
yay -S --needed neovim \
|
||||
network-manager-applet \
|
||||
kitty \
|
||||
ghostty \
|
||||
btop \
|
||||
zoxide fzf \
|
||||
superfile
|
||||
Loading…
Add table
Add a link
Reference in a new issue