From 3318f33c31f469f1eb5f3707b0b8c5ca5ab1915b Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Sat, 7 Sep 2024 23:27:46 +0900 Subject: [PATCH 1/2] adjusted to detect if pulseaudio is installed --- install.sh | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/install.sh b/install.sh index 159ac60..8d409fc 100755 --- a/install.sh +++ b/install.sh @@ -1,25 +1,42 @@ #!/bin/bash # https://github.com/JaKooLit +# Set some colors for output messages +OK="$(tput setaf 2)[OK]$(tput sgr0)" +ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)" +NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)" +WARN="$(tput setaf 166)[WARN]$(tput sgr0)" +CAT="$(tput setaf 6)[ACTION]$(tput sgr0)" +ORANGE=$(tput setaf 166) +YELLOW=$(tput setaf 3) +RESET=$(tput sgr0) + + # Check if running as root. If root, script will exit if [[ $EUID -eq 0 ]]; then - echo "This script should not be executed as root! Exiting......." + echo "$ERROR This script should not be executed as root! Exiting......." exit 1 fi clear +# Check if PulseAudio package is installed +if pacman -Qq pulseaudio >/dev/null 2>&1; then + echo "$ERROR PulseAudio is installed. Uninstall it first or edit install.sh on line 211 (execute_script 'pipewire.sh')." + exit 1 +fi + # Check if base-devel is installed if pacman -Q base-devel &> /dev/null; then echo "base-devel is already installed." else - echo "Install base-devel.........." + echo "$NOTE Install base-devel.........." if sudo pacman -S --noconfirm --needed base-devel; then - echo "base-devel has been installed successfully." + echo "$OK base-devel has been installed successfully." else - echo "Error: base-devel not found nor cannot be installed." - echo "Please install base-devel manually before running this script... Exiting" + echo "$ERROR base-devel not found nor cannot be installed." + echo "$ACTION Please install base-devel manually before running this script... Exiting" exit 1 fi fi @@ -63,17 +80,6 @@ if [[ $use_preset = [Yy] ]]; then source ./preset.sh fi -# Set some colors for output messages -OK="$(tput setaf 2)[OK]$(tput sgr0)" -ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)" -NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)" -WARN="$(tput setaf 166)[WARN]$(tput sgr0)" -CAT="$(tput setaf 6)[ACTION]$(tput sgr0)" -ORANGE=$(tput setaf 166) -YELLOW=$(tput setaf 3) -RESET=$(tput sgr0) - - # Function to colorize prompts colorize_prompt() { local color="$1" From 9241cbf2c617e5925b0430bb4ac297545d0a9455 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Sat, 7 Sep 2024 23:29:23 +0900 Subject: [PATCH 2/2] added sof-firmware --- CHANGELOGS.md | 4 ++++ install-scripts/pipewire.sh | 1 + 2 files changed, 5 insertions(+) diff --git a/CHANGELOGS.md b/CHANGELOGS.md index 85b2d70..d03de31 100644 --- a/CHANGELOGS.md +++ b/CHANGELOGS.md @@ -1,5 +1,9 @@ ## Changelogs +## 07 Sep 2024 +- added pulseaudio check +- added sof-firmware + ## 29 Aug 2024 - switched over to non-git wallust package - improved indentions on some install scripts diff --git a/install-scripts/pipewire.sh b/install-scripts/pipewire.sh index 719bfbc..401c11b 100755 --- a/install-scripts/pipewire.sh +++ b/install-scripts/pipewire.sh @@ -8,6 +8,7 @@ pipewire=( pipewire-audio pipewire-alsa pipewire-pulse + sof-firmware ) ############## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##############