This commit is contained in:
Brian Zalewski 2024-01-02 02:00:28 +00:00
parent 83a6ab579f
commit 40e84d59ad
3 changed files with 13 additions and 9 deletions

View file

@ -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
}
@ -637,7 +639,7 @@ runChezmoi() {
LOG_FILE="$HOME/.local/var/log/install.doctor/chezmoi-apply-$(date +%s).log"
### Apply command flags
COMMON_MODIFIERS="--use-builtin-diff"
COMMON_MODIFIERS="--no-pager"
FORCE_MODIFIER=""
if [ -n "$HEADLESS_INSTALL" ]; then
logg info 'Running chezmoi apply forcefully because HEADLESS_INSTALL is set'

View file

@ -637,7 +637,7 @@ runChezmoi() {
LOG_FILE="$HOME/.local/var/log/install.doctor/chezmoi-apply-$(date +%s).log"
### Apply command flags
COMMON_MODIFIERS="--use-builtin-diff"
COMMON_MODIFIERS="--no-pager"
FORCE_MODIFIER=""
if [ -n "$HEADLESS_INSTALL" ]; then
logg info 'Running chezmoi apply forcefully because HEADLESS_INSTALL is set'

View file

@ -278,15 +278,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
}
@ -329,7 +331,7 @@ runChezmoi() {
LOG_FILE="$HOME/.local/var/log/install.doctor/chezmoi-apply-$(date +%s).log"
### Apply command flags
COMMON_MODIFIERS="--use-builtin-diff"
COMMON_MODIFIERS="--no-pager"
FORCE_MODIFIER=""
if [ -n "$HEADLESS_INSTALL" ]; then
logg info 'Running chezmoi apply forcefully because HEADLESS_INSTALL is set'