Adding in AMD fixes after framework install
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -6,3 +6,5 @@
|
|||||||
.idea/
|
.idea/
|
||||||
.vscode/
|
.vscode/
|
||||||
.claude/settings.local.json
|
.claude/settings.local.json
|
||||||
|
install.log
|
||||||
|
install.log.*
|
||||||
|
|||||||
29
install.sh
29
install.sh
@@ -69,6 +69,10 @@ DOCTOR_ONLY=0
|
|||||||
MODE_OVERRIDE=""
|
MODE_OVERRIDE=""
|
||||||
INSTALL_CERTS=1
|
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
|
while [[ $# -gt 0 ]]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--no-autostart) AUTOSTART=0 ;;
|
--no-autostart) AUTOSTART=0 ;;
|
||||||
@@ -111,7 +115,32 @@ compute_stream_mode() {
|
|||||||
STREAM_MODE="mirror"
|
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() {
|
main() {
|
||||||
|
setup_install_log
|
||||||
require_not_root
|
require_not_root
|
||||||
require_arch
|
require_arch
|
||||||
require_yay
|
require_yay
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Shared helpers: logging, sudo, preflight checks, idempotency primitives.
|
# Shared helpers: logging, sudo, preflight checks, idempotency primitives.
|
||||||
|
|
||||||
if [[ -t 1 ]]; then
|
if [[ -t 1 ]] || [[ "${FORCE_COLOR:-0}" == "1" ]]; then
|
||||||
BOLD=$'\033[1m'
|
BOLD=$'\033[1m'
|
||||||
DIM=$'\033[2m'
|
DIM=$'\033[2m'
|
||||||
RED=$'\033[31m'
|
RED=$'\033[31m'
|
||||||
|
|||||||
@@ -80,7 +80,11 @@ install_gpu_encoder_packages() {
|
|||||||
;;
|
;;
|
||||||
amd)
|
amd)
|
||||||
# VAAPI (mesa) + Vulkan for AMD hardware encode paths.
|
# VAAPI (mesa) + Vulkan for AMD hardware encode paths.
|
||||||
yay_install libva-mesa-driver mesa-vdpau vulkan-radeon
|
# libva-mesa-driver is now provided by mesa (merged upstream); mesa-vdpau
|
||||||
|
# was removed from official repos. Naming them here makes yay fall back to
|
||||||
|
# AUR and pull in random forks like mesa-rk35xx-git that advertise
|
||||||
|
# `provides=(libva-mesa-driver mesa-vdpau)`.
|
||||||
|
yay_install mesa vulkan-radeon
|
||||||
;;
|
;;
|
||||||
intel)
|
intel)
|
||||||
yay_install intel-media-driver vulkan-intel
|
yay_install intel-media-driver vulkan-intel
|
||||||
|
|||||||
Reference in New Issue
Block a user