Skip to content

Commit

Permalink
Merge pull request JaKooLit#147 from JaKooLit/development
Browse files Browse the repository at this point in the history
Development to Main
  • Loading branch information
JaKooLit authored Sep 8, 2024
2 parents fb2866e + 4f7ff52 commit 5f59d96
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOGS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## Changelogs

## 08 Sep 2024
- Added final error checks on install-logs

## 07 Sep 2024
- added pulseaudio check
- added sof-firmware
Expand Down
1 change: 1 addition & 0 deletions install-scripts/00-hypr-pkgs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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! ##
Expand Down
6 changes: 3 additions & 3 deletions install-scripts/bluetooth.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# Bluetooth Stuff #

blue=(
bluez
bluez-utils
blueman
bluez
bluez-utils
blueman
)

## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
Expand Down
43 changes: 40 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -259,14 +259,51 @@ if [ "$dots" == "Y" ]; then

fi

clear

printf "\n%.0s" {1..3}

# Error-checking section
LOG_DIR="Install-Logs"
ERROR_FILE="$LOG_DIR/00-Error.log"

# Create or clear the error file
: > "$ERROR_FILE"

# Check if the Install-Logs directory exists
if [ -d "$LOG_DIR" ]; then
# Iterate through each file in the Install-Logs directory
for log_file in "$LOG_DIR"/*; do
# Check if it's a file
if [ -f "$log_file" ]; then
# Search for lines containing the word "error" (case-insensitive) in the log file
if grep -i "error" "$log_file" > /dev/null; then
# If errors are found, add the filename to the error file
echo "${WARN} Errors found in file: $(basename "$log_file")" >> "$ERROR_FILE"
fi
fi
done

# Check if the error file has any content
if [ -s "$ERROR_FILE" ]; then
echo "${ERROR} Errors encountered during Installation. See $ERROR_FILE for details."
else
echo "${OK} No errors were found."
fi
else
echo "Directory $LOG_DIR does not exist or could not be found."
fi

printf "\n%.0s" {1..1}

# Check if hyprland or hyprland-git is installed
if pacman -Q hyprland &> /dev/null || pacman -Q hyprland-git &> /dev/null; then
printf "\n${OK} Yey! Installation Completed.\n"
printf "\n${OK} Hyprland is installed. However, there may some errors during installation "
printf "\n${CAT} Please see the errors in Install-Logs as stated above\n"
sleep 2
printf "\n${NOTE} You can start Hyprland by typing Hyprland (IF SDDM is not installed) (note the capital H!).\n"
printf "\n"
printf "\n${NOTE} It is highly recommended to reboot your system.\n\n"
printf "\n${NOTE} However, It is highly recommended to reboot your system.\n\n"

# Prompt user to reboot
read -rp "${CAT} Would you like to reboot now? (y/n): " HYP
Expand All @@ -281,6 +318,6 @@ if pacman -Q hyprland &> /dev/null || pacman -Q hyprland-git &> /dev/null; then
fi
else
# Print error message if neither package is installed
printf "\n${WARN} Hyprland failed to install. Please check Install-Logs...\n\n"
printf "\n${WARN} Hyprland failed to install. Please check Error Log and Install-Logs directory...\n\n"
exit 1
fi

0 comments on commit 5f59d96

Please sign in to comment.