Adding in AMD fixes after framework install

This commit is contained in:
2026-05-20 12:58:02 -06:00
parent be34fb0dc6
commit 836d775d3d
4 changed files with 37 additions and 2 deletions

View File

@@ -69,6 +69,10 @@ DOCTOR_ONLY=0
MODE_OVERRIDE=""
INSTALL_CERTS=1
# Capture args verbatim before the parse loop consumes them, so the install
# log can record what flags this invocation actually ran with.
ARGV_FOR_LOG="$*"
while [[ $# -gt 0 ]]; do
case "$1" in
--no-autostart) AUTOSTART=0 ;;
@@ -111,7 +115,32 @@ compute_stream_mode() {
STREAM_MODE="mirror"
}
# Tee stdout+stderr to install.log (in the repo root) while still printing to
# the terminal. The log file gets ANSI escapes stripped so it stays readable
# with `less` / `grep`. Each run appends a header with timestamp + args, and
# an exit-status footer via the EXIT trap. Old logs auto-rotate at >5 MiB.
setup_install_log() {
local log="$SCRIPT_DIR/install.log"
if [[ -f "$log" ]] && [[ $(stat -c %s "$log" 2>/dev/null || echo 0) -gt 5242880 ]]; then
mv -f "$log" "$log.1"
fi
{
echo
echo "=== $(date -Iseconds) host=$(hostname) user=$(id -un) ==="
echo " args: ${ARGV_FOR_LOG:-(none)}"
} >> "$log"
# stdout is about to become a pipe, so [[ -t 1 ]] in lib/common.sh would
# disable colors. FORCE_COLOR keeps the terminal output colored; sed strips
# ANSI from the log copy.
export FORCE_COLOR=1
exec > >(tee >(sed -u 's/\x1b\[[0-9;]*m//g' >> "$log")) 2>&1
trap 'rc=$?; printf "=== exit=%s @ %s ===\n" "$rc" "$(date -Iseconds)" >> "'"$log"'"' EXIT
}
main() {
setup_install_log
require_not_root
require_arch
require_yay