From 00f127b5f8306dcdbe76cd185d0e81b7f39f9c26 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Wed, 13 Dec 2023 21:43:16 +0900 Subject: [PATCH] added force install package script --- CHANGELOGS.md | 3 +++ README.md | 4 ++++ install-scripts/force-install.sh | 37 ++++++++++++++++++++++++++++++++ install.sh | 1 + 4 files changed, 45 insertions(+) create mode 100644 install-scripts/force-install.sh diff --git a/CHANGELOGS.md b/CHANGELOGS.md index 7c8e143..bcca7f2 100644 --- a/CHANGELOGS.md +++ b/CHANGELOGS.md @@ -1,5 +1,8 @@ ## Changelogs +## 13 Dec 2023 +- Added a script / function to force install packages. Some users reported that it is not installed. + ## 11 Dec 2023 - Changing over to zsh automatically if user opted - If chose to install zsh and have no login manager, zsh auto login will auto start Hyprland diff --git a/README.md b/README.md index 6aeceb3..688d429 100644 --- a/README.md +++ b/README.md @@ -167,6 +167,10 @@ sudo ninja -C build install #### Most common question I got is, Hey Ja, Why the heck it is taking long time to install? Other distro like Arch its only a minute or two. Why here takes like forever?!?!?! - Well, most of the core packages are downloaded and Build and compiled from SOURCE. There are no pre-built binary (yet) for Debian and Ubuntu. Unlike Other distros, they already have prepacked binary that can just download and install. +### ❗ some known issues on this Installer +- some users reported that they have to install some packages. It is in the install-scripts/force-install.sh +- At this time the packages force to install are the following `imagemagick` + ### 🏴‍☠️🏴‍☠️🏴‍☠️ Got a questions regarding the Hyprland Dots? - Head over to wiki Link [`WIKI`](🏴https://github.com/JaKooLit/Hyprland-Dots/wiki) diff --git a/install-scripts/force-install.sh b/install-scripts/force-install.sh new file mode 100644 index 0000000..77cd9ed --- /dev/null +++ b/install-scripts/force-install.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +force=( + imagemagick +) + +############## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU'RE DOING! ############## + +# Determine the directory where the script is located +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +# Change the working directory to the parent directory of the script +PARENT_DIR="$SCRIPT_DIR/.." +cd "$PARENT_DIR" || exit 1 + +# Set some colors for output messages +OK="$(tput setaf 2)[OK]$(tput sgr0)" +ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)" +NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)" +WARN="$(tput setaf 166)[WARN]$(tput sgr0)" +CAT="$(tput setaf 6)[ACTION]$(tput sgr0)" +ORANGE=$(tput setaf 166) +YELLOW=$(tput setaf 3) +RESET=$(tput sgr0) + +# Set the name of the log file to include the current date and time +LOG="install-$(date +'%d-%H%M%S')_force.log" + + +printf "${NOTE} Force installing packages...\n" + for FORCE in "${force[@]}"; do + sudo apt-get --reinstall install -y "$FORCE" 2>&1 | tee -a "$LOG" + [ $? -ne 0 ] && { echo -e "\e[1A\e[K${ERROR} - $CLIP install had failed, please check the install.log"; exit 1; } + done + + +clear \ No newline at end of file diff --git a/install.sh b/install.sh index 5fbb0f1..16a4b71 100644 --- a/install.sh +++ b/install.sh @@ -164,6 +164,7 @@ execute_script "swappy.sh" execute_script "swww.sh" execute_script "rofi-wayland.sh" execute_script "pywal.sh" +execute_script "force-install.sh" if [ "$nvidia" == "Y" ]; then