From 43f348e34df96e96d2e6c29cb0573514d3a6f18a Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Tue, 10 Jan 2023 04:19:28 +0000 Subject: [PATCH] Update file provision.sh --- local/provision.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/local/provision.sh b/local/provision.sh index d3140518..b6d41649 100644 --- a/local/provision.sh +++ b/local/provision.sh @@ -8,6 +8,15 @@ # ~/.local/share/chezmoi. Finally, it begins the TUI experience by displaying styled documentation, prompts, and finishes # by calling the appropriate Chezmoi commands. +### Print output to console and log file +if [ ! -d "$HOME/.cache/megabyte-labs" ]; then + mkdir -p "$HOME/.cache/megabyte-labs" +fi +# Source: https://unix.stackexchange.com/a/323189 +exec 3<&1 +coproc logtee { tee "$HOME/.cache/megabyte-labs/betelgeuse.log" >&3; } +exec >&${logtee[1]} 2>&1 + # @description Installs glow (a markdown renderer) from GitHub releases # @example installGlow installGlow() {