This commit is contained in:
2026-01-24 07:34:13 +00:00
parent 1d4cda3b47
commit de60d62d1a

View File

@@ -88,13 +88,8 @@ awk -v s="$MARKER_START" -v e="$MARKER_END" '
$0==e {inside=0; next}
!inside {print}
' "$BASH_BASHRC" > "$tmp"
install -m "$orig_mode" -o "$orig_owner" -g "$orig_group" "$tmp" "$BASH_BASHRC"
if command -v restorecon >/dev/null 2>&1; then
restorecon "$BASH_BASHRC" >/dev/null 2>&1 || true
fi
rm -f "$tmp"
cat >> "$BASH_BASHRC" <<EOF
cat >> "$tmp" <<EOF
$MARKER_START
# Load PS1 + Banner (managed)
@@ -107,6 +102,12 @@ fi
$MARKER_END
EOF
install -m "$orig_mode" -o "$orig_owner" -g "$orig_group" "$tmp" "$BASH_BASHRC"
if command -v restorecon >/dev/null 2>&1; then
restorecon "$BASH_BASHRC" >/dev/null 2>&1 || true
fi
rm -f "$tmp"
echo "✅ Installert globalt (Linux/WSL):"
echo " - $DST_PS1"
echo " - $DST_BANNER"