Ensure HOME directory exists before export

This commit is contained in:
Alexandre
2026-01-11 08:49:57 +01:00
parent 4e16f8da5c
commit 3d604d4809
2 changed files with 10 additions and 4 deletions

View File

@@ -301,11 +301,14 @@ done
update_scripts_with_block
# --- MINIMAL CHANGE: also inject into /etc/bash.bashrc (for interactive bash shells)
mkdir -p /etc "$HOME"
mkdir -p /etc
touch "/etc/bash.bashrc"
touch "$HOME/bash.bashrc"
inject_block_into_file "/etc/bash.bashrc"
inject_block_into_file "$HOME/bash.bashrc"
if [[ -n "${HOME:-}" ]]; then
mkdir -p "$HOME"
touch "$HOME/bash.bashrc"
inject_block_into_file "$HOME/bash.bashrc"
fi
################
# Set timezone #