This commit is contained in:
JaKooLit 2025-02-04 23:09:50 +09:00
parent 37aef30bbd
commit c447605701
3 changed files with 16 additions and 8 deletions

View File

@ -27,7 +27,7 @@ dependencies=(
python3-pyquery python3-pyquery
qt6-base-dev qt6-base-dev
spirv-tools spirv-tools
vulkan-validationlayers #vulkan-validationlayers
vulkan-utility-libraries-dev vulkan-utility-libraries-dev
wayland-protocols wayland-protocols
xdg-desktop-portal xdg-desktop-portal

View File

@ -101,6 +101,21 @@ for PKG2 in "${force[@]}"; do
re_install_package "$PKG2" "$LOG" re_install_package "$PKG2" "$LOG"
done done
# install YAD from assets. NOTE This is downloaded from SID repo and sometimes
# Trixie is removing YAD for some strange reasons
# Check if yad is installed
if ! command -v yad &> /dev/null; then
# yad is not installed, so install it
echo "${INFO} Installing ${YELLOW}YAD from assets${RESET} ..."
sudo dpkg -i assets/yad_0.40.0-1+b2_amd64.deb
# Handle potential dependency issues after installing the .deb
sudo apt-get install -f -y
fi
printf "\n%.0s" {1..2}
# Install up-to-date Rust # Install up-to-date Rust
echo "${INFO}Installing most ${YELLOW}up to date Rust compiler${RESET} ..." echo "${INFO}Installing most ${YELLOW}up to date Rust compiler${RESET} ..."
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y 2>&1 | tee -a "$LOG" curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y 2>&1 | tee -a "$LOG"

View File

@ -61,11 +61,9 @@ install_package() {
# Double check if the package was re-installed successfully # Double check if the package was re-installed successfully
if dpkg -l | grep -q -w "$1"; then if dpkg -l | grep -q -w "$1"; then
echo -e "\e[1A\e[K${OK} Package ${YELLOW}$1${RESET} has been successfully installed!" echo -e "\e[1A\e[K${OK} Package ${YELLOW}$1${RESET} has been successfully installed!"
return 0
else else
# Package was not found, installation failed # Package was not found, installation failed
echo -e "${ERROR} ${YELLOW}$1${RESET} failed to install. Please check the install.log. You may need to install it manually. Sorry, I have tried :(" echo -e "${ERROR} ${YELLOW}$1${RESET} failed to install. Please check the install.log. You may need to install it manually. Sorry, I have tried :("
return 1
fi fi
fi fi
} }
@ -76,16 +74,13 @@ re_install_package() {
if sudo apt-get install --reinstall -y "$1" 2>&1 | tee -a "$LOG"; then if sudo apt-get install --reinstall -y "$1" 2>&1 | tee -a "$LOG"; then
if dpkg -l | grep -q -w "$1"; then if dpkg -l | grep -q -w "$1"; then
echo -e "\e[1A\e[K${OK} Package ${YELLOW}$1${RESET} has been successfully re-installed!" echo -e "\e[1A\e[K${OK} Package ${YELLOW}$1${RESET} has been successfully re-installed!"
return 0
else else
# Package was not found, installation failed # 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 :(" echo -e "${ERROR} $1 failed to install. Please check the install.log. You may need to install it manually. Sorry, I have tried :("
return 1
fi fi
else else
# Installation command failed # 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 :(" echo -e "${ERROR} Failed to reinstall $1. Please check the install.log. You may need to install it manually. Sorry, I have tried :("
return 1
fi fi
} }
@ -95,10 +90,8 @@ uninstall_package() {
sudo apt-get autoremove -y "$1" >> "$LOG" 2>&1 sudo apt-get autoremove -y "$1" >> "$LOG" 2>&1
if ! dpkg -l | grep -q -w "^ii $1" ; then if ! dpkg -l | grep -q -w "^ii $1" ; then
echo -e "\e[1A\e[K${OK} ${MAGENTA}$1${RESET} was uninstalled." echo -e "\e[1A\e[K${OK} ${MAGENTA}$1${RESET} was uninstalled."
return 0
else else
echo -e "\e[1A\e[K${ERROR} $1 failed to uninstall. Please check the uninstall.log." echo -e "\e[1A\e[K${ERROR} $1 failed to uninstall. Please check the uninstall.log."
return 1
fi fi
fi fi
} }