From be33940eb89a1a304e441d569f781bd4ad62d560 Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Wed, 25 Jan 2023 04:59:29 +0000 Subject: [PATCH] Update 2 files - /home/.chezmoitemplates/universal/profile-inline - /home/.chezmoiscripts/_universal/run_before_01-add-temporary-includes.tmpl --- .../run_before_01-add-temporary-includes.tmpl | 28 ++++++++----------- .../universal/profile-inline | 8 +++--- 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/home/.chezmoiscripts/_universal/run_before_01-add-temporary-includes.tmpl b/home/.chezmoiscripts/_universal/run_before_01-add-temporary-includes.tmpl index 73052ec1..25fd7a86 100644 --- a/home/.chezmoiscripts/_universal/run_before_01-add-temporary-includes.tmpl +++ b/home/.chezmoiscripts/_universal/run_before_01-add-temporary-includes.tmpl @@ -2,25 +2,21 @@ #!/usr/bin/env bash ### Ensure /tmp/tmp-profile is created and owned by root -if [ ! -f /tmp/tmp-profile ]; then - # Add pre-scaffolding profile to /tmp/tmp-profile so it's easier to navigate through scripts - cat << EOF > /tmp/tmp-profile - {{ includeTemplate "universal/profile-inline" }} - EOF +# Add pre-scaffolding profile to /tmp/tmp-profile so it's easier to navigate through scripts +cat << EOF > /tmp/tmp-profile +{{ includeTemplate "universal/profile-inline" }} +EOF - # Make /tmp/tmp-profile owned by root to prevent tampering - sudo chown root /tmp/tmp-profile -fi +# Make /tmp/tmp-profile owned by root to prevent tampering +sudo chown root /tmp/tmp-profile ### Ensure /tmp/tmp-logg is created and owned by root -if [ ! -f /tmp/tmp-logg ]; then - # Add pre-scaffolding /tmp/tmp-logg - cat << EOF > /tmp/tmp-logg - {{ includeTemplate "universal/logg-inline" }} - EOF +# Add pre-scaffolding /tmp/tmp-logg +cat << EOF > /tmp/tmp-logg +{{ includeTemplate "universal/logg-inline" }} +EOF - # Make /tmp/tmp-logg owned by root to prevent tampering - sudo chown root /tmp/tmp-logg -fi +# Make /tmp/tmp-logg owned by root to prevent tampering +sudo chown root /tmp/tmp-logg {{ end -}} diff --git a/home/.chezmoitemplates/universal/profile-inline b/home/.chezmoitemplates/universal/profile-inline index 563e46a2..d9d96e71 100644 --- a/home/.chezmoitemplates/universal/profile-inline +++ b/home/.chezmoitemplates/universal/profile-inline @@ -13,7 +13,7 @@ XDG_CACHE_HOME="$HOME/.cache" XDG_DATA_DIR="$HOME/.local/share" ### Ensure Homebrew PATHs -if [ -d /home/linuxbrew/.linuxbrew/bin ]; then +if [ -d "/home/linuxbrew/.linuxbrew/bin" ]; then export HOMEBREW_PREFIX="/home/linuxbrew/.linuxbrew" export HOMEBREW_CELLAR="/home/linuxbrew/.linuxbrew/Cellar" export HOMEBREW_REPOSITORY="/home/linuxbrew/.linuxbrew/Homebrew" @@ -21,10 +21,10 @@ if [ -d /home/linuxbrew/.linuxbrew/bin ]; then export MANPATH="/home/linuxbrew/.linuxbrew/share/man${MANPATH+:$MANPATH}:" export INFOPATH="/home/linuxbrew/.linuxbrew/share/info:${INFOPATH:-}" export WHALEBREW_INSTALL_PATH="/home/linuxbrew/.linuxbrew/whalebrew" -elif [ -f /opt/homebrew/bin/brew ]; then - eval "$(/opt/homebrew/bin/brew shellenv)" -elif [ -f /usr/local/bin/brew ]; then +elif [ -f "/usr/local/bin/brew" ]; then eval "$(/usr/local/bin/brew shellenv)" +elif [ -f "/opt/homebrew/bin/brew" ]; then + eval "$(/opt/homebrew/bin/brew shellenv)" fi ### Ensure ~/.local/bin in PATH