mirror of
https://github.com/JaKooLit/Debian-Hyprland.git
synced 2025-12-21 18:20:13 +01:00
Merge pull request #151 from JaKooLit/main
Main to Development synchronization
This commit is contained in:
commit
f2f758eba8
@ -40,6 +40,27 @@ install_package() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Function for re-installing packages
|
||||||
|
re_install_package() {
|
||||||
|
echo -e "${NOTE} Force installing $1 ..."
|
||||||
|
|
||||||
|
# Try to reinstall the package
|
||||||
|
if sudo apt-get install --reinstall -y "$1" 2>&1 | tee -a "$LOG"; then
|
||||||
|
# Check if the package was installed successfully
|
||||||
|
if dpkg -l | grep -q -w "$1"; then
|
||||||
|
echo -e "${OK} $1 was installed successfully."
|
||||||
|
else
|
||||||
|
# Package was not found, installation failed
|
||||||
|
echo -e "${ERROR} $1 failed to install. Please check the install.log. You may need to install it manually. Sorry, I have tried :("
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# Installation command failed
|
||||||
|
echo -e "${ERROR} Failed to reinstall $1. Please check the install.log. You may need to install it manually. Sorry, I have tried :("
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
uninstall_package() {
|
uninstall_package() {
|
||||||
# Check if package is installed
|
# Check if package is installed
|
||||||
if sudo dpkg -l | grep -q -w "^ii $1" ; then
|
if sudo dpkg -l | grep -q -w "^ii $1" ; then
|
||||||
|
|||||||
@ -7,7 +7,10 @@ hypr=(
|
|||||||
libhyprlang-dev
|
libhyprlang-dev
|
||||||
hyprwayland-scanner
|
hyprwayland-scanner
|
||||||
hyprland-protocols
|
hyprland-protocols
|
||||||
hyprland-dev
|
)
|
||||||
|
|
||||||
|
# forcing to reinstall. Had experience it says hyprland is already installed
|
||||||
|
f_hypr=(
|
||||||
hyprland
|
hyprland
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -26,10 +29,17 @@ LOG="Install-Logs/install-$(date +%d-%H%M%S)_hyprland.log"
|
|||||||
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
||||||
|
|
||||||
# Hyprland
|
# Hyprland
|
||||||
printf "${NOTE} Installing Hyprland .......\n"
|
printf "${NOTE} Installing additional Hyprland packages .......\n"
|
||||||
for HYPR in "${hypr[@]}"; do
|
for HYPR in "${hypr[@]}"; do
|
||||||
install_package "$HYPR" 2>&1 | tee -a "$LOG"
|
install_package "$HYPR" 2>&1 | tee -a "$LOG"
|
||||||
[ $? -ne 0 ] && { echo -e "\e[1A\e[K${ERROR} - $HYPR Package installation failed, Please check the installation logs"; exit 1; }
|
[ $? -ne 0 ] && { echo -e "\e[1A\e[K${ERROR} - $HYPR Package installation failed, Please check the installation logs"; exit 1; }
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# force
|
||||||
|
printf "${NOTE} Force Installing Hyprland .......\n"
|
||||||
|
for HYPR1 in "${f_hypr[@]}"; do
|
||||||
|
re_install_package "$HYPR1" 2>&1 | tee -a "$LOG"
|
||||||
|
[ $? -ne 0 ] && { echo -e "\e[1A\e[K${ERROR} - $HYPR1 Package installation failed, Please check the installation logs"; exit 1; }
|
||||||
|
done
|
||||||
|
|
||||||
clear
|
clear
|
||||||
@ -30,7 +30,12 @@ for PKG1 in "${depend[@]}"; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
##
|
# check if Imagemagick is already installed manually
|
||||||
|
if [ -f "/usr/local/bin/magick" ]; then
|
||||||
|
echo "${NOTE} /usr/local/bin/magick already exists. skipping installation of Imagemagick." 2>&1 | tee -a "$LOG"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
printf "${NOTE} Installing ImageMagick from source...\n"
|
printf "${NOTE} Installing ImageMagick from source...\n"
|
||||||
|
|
||||||
# Check if folder exists and remove it
|
# Check if folder exists and remove it
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user