Terminal interface to find, download, and stream movies, TV shows, and live TV using local media players.
feat(install): automatically clear terminal screen before starting installer
Samir Hossains953b8f9e49ee
diff --git a/install.ps1 b/install.ps1index 9a75e2d..419dec1 100644--- a/install.ps1+++ b/install.ps1@@ -42,6 +42,7 @@ function Write-Warn { param([string]$Message) Write-Host " ⚠ " -ForegroundColfunction Write-Err { param([string]$Message) Write-Host " ✖ " -ForegroundColor Red -NoNewline; Write-Host $Message; exit 1 }function Print-Header {+ try { [Console]::Clear() } catch { Clear-Host }$Header = @"███╗ ███╗ ██████╗ ██╗ ██╗ ██╗ ███████╗ ██████╗ ██████╗ ██╗ ██╗████╗ ████║ ██╔═══██╗ ██║ ██║ ██║ ██╔════╝ ██╔══██╗ ██╔═══██╗ ╚██╗██╔╝diff --git a/install.sh b/install.shindex c6b2e8f..e698148 100755--- a/install.sh+++ b/install.sh@@ -150,7 +150,14 @@ log_error() {printf " %b%s%b %b%s%b\n" "$C_RED" "✖" "$C_RESET" "$C_TEXT" "$1" "$C_RESET" >&2}+clear_screen() {+ if [ "$IS_TTY" -eq 1 ] && [ "${TERM:-}" != "dumb" ]; then+ clear 2>/dev/null || printf "\033[2J\033[3J\033[H"+ fi+}+print_header() {+ clear_screenif [ "$IS_COLOR" -eq 1 ] && [ "$IS_TTY" -eq 1 ]; thenprintf "%b\n" "$CURSOR_HIDE"printf "%b%b" "$C_BOLD" "$C_MAUVE"