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
|
# execute all executable files (excluding templates and editor backups) in the
|
||||||
# ~/.config/yadm/bootstrap.d directory when run.
|
# ~/.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
|
set -eu
|
||||||
|
|
||||||
# Directory to look for bootstrap executables in
|
# 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)
|
done < <(find -L "$BOOTSTRAP_D" -type f | sort)
|
||||||
|
|
||||||
for bootstrap in "${bootstraps[@]}"; do
|
for bootstrap in "${bootstraps[@]}"; do
|
||||||
echo "----------------------------"
|
display "Executing $bootstrap"
|
||||||
echo "# Executing $bootstrap"
|
|
||||||
|
|
||||||
if ! "$bootstrap"; then
|
if ! "$bootstrap"; then
|
||||||
echo "Error: bootstrap '$bootstrap' failed" >&2
|
echo "Error: bootstrap '$bootstrap' failed" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
display "Bootstrap completed"
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ echo "Installing general apps"
|
||||||
|
|
||||||
yay -S --needed neovim \
|
yay -S --needed neovim \
|
||||||
network-manager-applet \
|
network-manager-applet \
|
||||||
kitty \
|
ghostty \
|
||||||
btop \
|
btop \
|
||||||
zoxide fzf \
|
zoxide fzf \
|
||||||
superfile
|
superfile
|
||||||
Loading…
Add table
Add a link
Reference in a new issue