From 16f3c44ec8e2b88e5d55b682a265026accb615c2 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Sun, 8 Sep 2024 11:25:42 +0900 Subject: [PATCH] Added error checks --- install-scripts/00-hypr-pkgs.sh | 1 + install.sh | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/install-scripts/00-hypr-pkgs.sh b/install-scripts/00-hypr-pkgs.sh index 961873f..4ca0d50 100755 --- a/install-scripts/00-hypr-pkgs.sh +++ b/install-scripts/00-hypr-pkgs.sh @@ -73,6 +73,7 @@ uninstall=( dunst mako rofi + wallust-git ) ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## diff --git a/install.sh b/install.sh index bf96342..b90f18e 100755 --- a/install.sh +++ b/install.sh @@ -21,8 +21,8 @@ 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')." +if pacman -Qq | grep -qw pulseaudio; then + echo "$ERROR PulseAudio is detected as installed. Uninstall it first or edit install.sh on line 211 (execute_script 'pipewire.sh')." exit 1 fi @@ -259,6 +259,8 @@ if [ "$dots" == "Y" ]; then fi +printf "\n%.0s" {1..3} + # Error-checking section LOG_DIR="Install-Logs" ERROR_FILE="$LOG_DIR/00-Error.log" @@ -282,7 +284,7 @@ if [ -d "$LOG_DIR" ]; then # Check if the error file has any content 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 echo "${OK} No errors were found." # Optionally remove the error file if it's empty