From c943b5a53e356a561ec2bf13870b7d3d86a7264a Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Tue, 10 Jan 2023 08:41:42 +0000 Subject: [PATCH] Update 2 files - /local/provision.sh - /home/dot_local/bin/executable_provision.tmpl --- home/dot_local/bin/executable_provision.tmpl | 12 ++++++++++-- local/provision.sh | 12 ++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/home/dot_local/bin/executable_provision.tmpl b/home/dot_local/bin/executable_provision.tmpl index 5da0823d..16a62fec 100644 --- a/home/dot_local/bin/executable_provision.tmpl +++ b/home/dot_local/bin/executable_provision.tmpl @@ -260,7 +260,15 @@ export DEBIAN_FRONTEND=noninteractive # shellcheck disable=SC2016 logg info 'Running `chezmoi apply`' if [ -n "$FORCE_CHEZMOI" ]; then - chezmoi apply -k --force 2>&1 | tee "${XDG_DATA_DIR:-$HOME/.local/share}/megabyte-labs/betelgeuse.$(date +%s).log" + if command -v unbuffer > /dev/null; then + unbuffer -p chezmoi apply -k --force 2>&1 | tee "${XDG_DATA_DIR:-$HOME/.local/share}/megabyte-labs/betelgeuse.$(date +%s).log" + else + chezmoi apply -k --force 2>&1 | tee "${XDG_DATA_DIR:-$HOME/.local/share}/megabyte-labs/betelgeuse.$(date +%s).log" + fi else - chezmoi apply -k 2>&1 | tee "${XDG_DATA_DIR:-$HOME/.local/share}/megabyte-labs/betelgeuse.$(date +%s).log" + if command -v unbuffer > /dev/null; then + unbuffer -p chezmoi apply -k 2>&1 | tee "${XDG_DATA_DIR:-$HOME/.local/share}/megabyte-labs/betelgeuse.$(date +%s).log" + else + chezmoi apply -k 2>&1 | tee "${XDG_DATA_DIR:-$HOME/.local/share}/megabyte-labs/betelgeuse.$(date +%s).log" + fi fi diff --git a/local/provision.sh b/local/provision.sh index 9592158e..f7f6b23d 100644 --- a/local/provision.sh +++ b/local/provision.sh @@ -427,7 +427,15 @@ export DEBIAN_FRONTEND=noninteractive # shellcheck disable=SC2016 logg info 'Running `chezmoi apply`' if [ -n "$FORCE_CHEZMOI" ]; then - chezmoi apply -k --force 2>&1 | tee "${XDG_DATA_DIR:-$HOME/.local/share}/megabyte-labs/betelgeuse.$(date +%s).log" + if command -v unbuffer > /dev/null; then + unbuffer -p chezmoi apply -k --force 2>&1 | tee "${XDG_DATA_DIR:-$HOME/.local/share}/megabyte-labs/betelgeuse.$(date +%s).log" + else + chezmoi apply -k --force 2>&1 | tee "${XDG_DATA_DIR:-$HOME/.local/share}/megabyte-labs/betelgeuse.$(date +%s).log" + fi else - chezmoi apply -k 2>&1 | tee "${XDG_DATA_DIR:-$HOME/.local/share}/megabyte-labs/betelgeuse.$(date +%s).log" + if command -v unbuffer > /dev/null; then + unbuffer -p chezmoi apply -k 2>&1 | tee "${XDG_DATA_DIR:-$HOME/.local/share}/megabyte-labs/betelgeuse.$(date +%s).log" + else + chezmoi apply -k 2>&1 | tee "${XDG_DATA_DIR:-$HOME/.local/share}/megabyte-labs/betelgeuse.$(date +%s).log" + fi fi