From daf4fccf0a893317230a50870f78320619bb6a57 Mon Sep 17 00:00:00 2001 From: Brian Zalewski <59970525+ProfessorManhattan@users.noreply.github.com> Date: Tue, 2 Jan 2024 02:33:04 +0000 Subject: [PATCH] Latest --- home/.chezmoi.yaml.tmpl | 1 + .../universal/run_after_01-pre-install.sh.tmpl | 3 +++ local/provision.sh | 3 ++- scripts/provision.sh | 11 +++++++---- scripts/src/provision.sh.tmpl | 3 ++- 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/home/.chezmoi.yaml.tmpl b/home/.chezmoi.yaml.tmpl index 28f692b8..fa4a4032 100644 --- a/home/.chezmoi.yaml.tmpl +++ b/home/.chezmoi.yaml.tmpl @@ -208,6 +208,7 @@ data: weatherZipCode: 07960 diff: command: delta + pager: delta format: git args: - "--paging" diff --git a/home/.chezmoiscripts/universal/run_after_01-pre-install.sh.tmpl b/home/.chezmoiscripts/universal/run_after_01-pre-install.sh.tmpl index 718820e9..cb41e68f 100644 --- a/home/.chezmoiscripts/universal/run_after_01-pre-install.sh.tmpl +++ b/home/.chezmoiscripts/universal/run_after_01-pre-install.sh.tmpl @@ -1,5 +1,8 @@ #!/usr/bin/env bash +{{ includeTemplate "universal/profile" }} +{{ includeTemplate "universal/logg" }} + # @description Copies the `~/.config/shell/exports.sh` file to `/etc/zshenv` so that non-interactive ZSH sessions have all of the same # environment PATH variables as interactive sessions. This was initially required to make Cakebrew work on macOS. addZshEnv() { diff --git a/local/provision.sh b/local/provision.sh index 102ffbf2..4dc85c53 100644 --- a/local/provision.sh +++ b/local/provision.sh @@ -645,7 +645,8 @@ runChezmoi() { logg info 'Running chezmoi apply forcefully because HEADLESS_INSTALL is set' FORCE_MODIFIER="--force" fi - KEEP_GOING_MODIFIER="" + # TODO: https://github.com/twpayne/chezmoi/discussions/3448 + KEEP_GOING_MODIFIER="-k" if [ -n "$KEEP_GOING" ]; then logg info 'Instructing chezmoi to keep going in the case of errors because KEEP_GOING is set' KEEP_GOING_MODIFIER="-k" diff --git a/scripts/provision.sh b/scripts/provision.sh index 5c81864d..4dc85c53 100644 --- a/scripts/provision.sh +++ b/scripts/provision.sh @@ -586,15 +586,17 @@ ensureHomebrewDeps() { # @description Ensure the `${XDG_DATA_HOME:-$HOME/.local/share}/chezmoi` directory is cloned and up-to-date using the previously # set `START_REPO` as the source repository. cloneChezmoiSourceRepo() { - if ! git config --get --global http.postBuffer > /dev/null; then - logg info 'Setting git http.postBuffer value high for large source repository' && git config --global http.postBuffer 524288000 - fi if [ -d "${XDG_DATA_HOME:-$HOME/.local/share}/chezmoi/.git" ]; then logg info "Changing directory to ${XDG_DATA_HOME:-$HOME/.local/share}/chezmoi" && cd "${XDG_DATA_HOME:-$HOME/.local/share}/chezmoi" + if ! git config --get http.postBuffer > /dev/null; then + logg info 'Setting git http.postBuffer value high for large source repository' && git config http.postBuffer 524288000 + fi logg info "Pulling the latest changes in ${XDG_DATA_HOME:-$HOME/.local/share}/chezmoi" && git pull origin master else logg info "Ensuring ${XDG_DATA_HOME:-$HOME/.local/share} is a folder" && mkdir -p "${XDG_DATA_HOME:-$HOME/.local/share}" logg info "Cloning ${START_REPO} to ${XDG_DATA_HOME:-$HOME/.local/share}/chezmoi" && git clone "${START_REPO}" "${XDG_DATA_HOME:-$HOME/.local/share}/chezmoi" + logg info "Changing directory to ${XDG_DATA_HOME:-$HOME/.local/share}/chezmoi" && cd "${XDG_DATA_HOME:-$HOME/.local/share}/chezmoi" + logg info 'Setting git http.postBuffer value high for large source repository' && git config http.postBuffer 524288000 fi } @@ -643,7 +645,8 @@ runChezmoi() { logg info 'Running chezmoi apply forcefully because HEADLESS_INSTALL is set' FORCE_MODIFIER="--force" fi - KEEP_GOING_MODIFIER="" + # TODO: https://github.com/twpayne/chezmoi/discussions/3448 + KEEP_GOING_MODIFIER="-k" if [ -n "$KEEP_GOING" ]; then logg info 'Instructing chezmoi to keep going in the case of errors because KEEP_GOING is set' KEEP_GOING_MODIFIER="-k" diff --git a/scripts/src/provision.sh.tmpl b/scripts/src/provision.sh.tmpl index c995129e..9e811418 100644 --- a/scripts/src/provision.sh.tmpl +++ b/scripts/src/provision.sh.tmpl @@ -337,7 +337,8 @@ runChezmoi() { logg info 'Running chezmoi apply forcefully because HEADLESS_INSTALL is set' FORCE_MODIFIER="--force" fi - KEEP_GOING_MODIFIER="" + # TODO: https://github.com/twpayne/chezmoi/discussions/3448 + KEEP_GOING_MODIFIER="-k" if [ -n "$KEEP_GOING" ]; then logg info 'Instructing chezmoi to keep going in the case of errors because KEEP_GOING is set' KEEP_GOING_MODIFIER="-k"