adjusted to detect if pulseaudio is installed
This commit is contained in:
38
install.sh
38
install.sh
@@ -1,25 +1,42 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# https://github.com/JaKooLit
|
# 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
|
# Check if running as root. If root, script will exit
|
||||||
if [[ $EUID -eq 0 ]]; then
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
clear
|
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
|
# Check if base-devel is installed
|
||||||
if pacman -Q base-devel &> /dev/null; then
|
if pacman -Q base-devel &> /dev/null; then
|
||||||
echo "base-devel is already installed."
|
echo "base-devel is already installed."
|
||||||
else
|
else
|
||||||
echo "Install base-devel.........."
|
echo "$NOTE Install base-devel.........."
|
||||||
|
|
||||||
if sudo pacman -S --noconfirm --needed base-devel; then
|
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
|
else
|
||||||
echo "Error: base-devel not found nor cannot be installed."
|
echo "$ERROR base-devel not found nor cannot be installed."
|
||||||
echo "Please install base-devel manually before running this script... Exiting"
|
echo "$ACTION Please install base-devel manually before running this script... Exiting"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -63,17 +80,6 @@ if [[ $use_preset = [Yy] ]]; then
|
|||||||
source ./preset.sh
|
source ./preset.sh
|
||||||
fi
|
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
|
# Function to colorize prompts
|
||||||
colorize_prompt() {
|
colorize_prompt() {
|
||||||
local color="$1"
|
local color="$1"
|
||||||
|
|||||||
Reference in New Issue
Block a user