Added error checks
This commit is contained in:
parent
b47a5f7a9a
commit
16f3c44ec8
|
|
@ -73,6 +73,7 @@ uninstall=(
|
||||||
dunst
|
dunst
|
||||||
mako
|
mako
|
||||||
rofi
|
rofi
|
||||||
|
wallust-git
|
||||||
)
|
)
|
||||||
|
|
||||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,8 @@ fi
|
||||||
clear
|
clear
|
||||||
|
|
||||||
# Check if PulseAudio package is installed
|
# Check if PulseAudio package is installed
|
||||||
if pacman -Qq pulseaudio >/dev/null 2>&1; then
|
if pacman -Qq | grep -qw pulseaudio; then
|
||||||
echo "$ERROR PulseAudio is installed. Uninstall it first or edit install.sh on line 211 (execute_script 'pipewire.sh')."
|
echo "$ERROR PulseAudio is detected as installed. Uninstall it first or edit install.sh on line 211 (execute_script 'pipewire.sh')."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -259,6 +259,8 @@ if [ "$dots" == "Y" ]; then
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..3}
|
||||||
|
|
||||||
# Error-checking section
|
# Error-checking section
|
||||||
LOG_DIR="Install-Logs"
|
LOG_DIR="Install-Logs"
|
||||||
ERROR_FILE="$LOG_DIR/00-Error.log"
|
ERROR_FILE="$LOG_DIR/00-Error.log"
|
||||||
|
|
@ -282,7 +284,7 @@ if [ -d "$LOG_DIR" ]; then
|
||||||
|
|
||||||
# Check if the error file has any content
|
# Check if the error file has any content
|
||||||
if [ -s "$ERROR_FILE" ]; then
|
if [ -s "$ERROR_FILE" ]; then
|
||||||
echo "${ERROR} Errors were found. See $ERROR_FILE for details."
|
echo "${ERROR} Errors encountered during Installation. See $ERROR_FILE for details."
|
||||||
else
|
else
|
||||||
echo "${OK} No errors were found."
|
echo "${OK} No errors were found."
|
||||||
# Optionally remove the error file if it's empty
|
# Optionally remove the error file if it's empty
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue