Adds GTK theme and bootstrap file
This commit is contained in:
parent
cdc55cfec9
commit
084c39594e
9 changed files with 62 additions and 25 deletions
|
|
@ -1,32 +1,29 @@
|
|||
#!/bin/bash
|
||||
|
||||
confirm() {
|
||||
# call with a prompt string or use a default
|
||||
read -r -p "${1} [y/N] " response
|
||||
case "$response" in
|
||||
[yY][eE][sS] | [yY])
|
||||
1
|
||||
;;
|
||||
*)
|
||||
0
|
||||
;;
|
||||
esac
|
||||
}
|
||||
# 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.
|
||||
|
||||
debug() {
|
||||
echo "Debug:"
|
||||
echo "XDG_SESSION_DESKTOP $XDG_SESSION_DESKTOP"
|
||||
}
|
||||
set -eu
|
||||
|
||||
CYAN='\033[0;36m'
|
||||
NC='\033[0m'
|
||||
# Directory to look for bootstrap executables in
|
||||
BOOTSTRAP_D="${BASH_SOURCE[0]}.d"
|
||||
|
||||
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
|
||||
if [[ ! -d "$BOOTSTRAP_D" ]]; then
|
||||
echo "Error: bootstrap directory '$BOOTSTRAP_D' not found" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# install dependencies
|
||||
source "$SCRIPT_DIR/_install_dependencies.sh"
|
||||
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)
|
||||
|
||||
source "$SCRIPT_DIR/_install_desktop_env.sh"
|
||||
|
||||
source "$SCRIPT_DIR/_install_keymap.sh"
|
||||
source "$SCRIPT_DIR/_install_fonts.sh"
|
||||
for bootstrap in "${bootstraps[@]}"; do
|
||||
if ! "$bootstrap"; then
|
||||
echo "Error: bootstrap '$bootstrap' failed" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue