From 6ea822660e5aa1bf6baa8e08a9aaf6dc3a2fd4de Mon Sep 17 00:00:00 2001
From: "Ja.KooLit" <85185940+JaKooLit@users.noreply.github.com>
Date: Thu, 29 Aug 2024 10:03:44 +0900
Subject: [PATCH 1/5] Update README.md
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index f7e9051..12f00d9 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-## NOTE: Ubuntu-Hyprland install script are moved to a different Repo
+# NOTE: Ubuntu-Hyprland install script are moved to a different Repo
- [`Ubuntu-Hyprland LINK`](https://github.com/JaKooLit/Ubuntu-Hyprland)
-- Ubuntu-Hyprland install script on this repo/branch will be deleted by the End Aug 2024
+
From cc573fe286c2beb02ddac740b2b0aedee3ffab2d Mon Sep 17 00:00:00 2001
From: "Ja.KooLit" <85185940+JaKooLit@users.noreply.github.com>
Date: Thu, 29 Aug 2024 10:04:24 +0900
Subject: [PATCH 2/5] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 12f00d9..6d82a5e 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# NOTE: Ubuntu-Hyprland install script are moved to a different Repo
+## NOTE: Ubuntu-Hyprland install script has its own repo now
- [`Ubuntu-Hyprland LINK`](https://github.com/JaKooLit/Ubuntu-Hyprland)
From 65ee22c04d96683fb5fc260c2faa190130f8b270 Mon Sep 17 00:00:00 2001
From: JaKooLit
Date: Sat, 31 Aug 2024 12:59:37 +0900
Subject: [PATCH 3/5] updated wallust and swww and iinstall.sh
---
install-scripts/swww.sh | 51 +++++++++++++++---------------
install-scripts/wallust.sh | 64 ++++++++++++++++----------------------
install.sh | 2 +-
3 files changed, 52 insertions(+), 65 deletions(-)
diff --git a/install-scripts/swww.sh b/install-scripts/swww.sh
index 260eaa1..a317ea9 100755
--- a/install-scripts/swww.sh
+++ b/install-scripts/swww.sh
@@ -3,11 +3,10 @@
# SWWW - Wallpaper Utility #
swww=(
- cargo
- liblz4-dev
+ liblz4-dev
)
-#specific branch or release
+# specific branch or release
swww_tag="v0.9.5"
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
@@ -28,38 +27,38 @@ MLOG="install-$(date +%d-%H%M%S)_swww2.log"
printf "\n%s - Installing swww dependencies.... \n" "${NOTE}"
for PKG1 in "${swww[@]}"; do
- install_package "$PKG1" 2>&1 | tee -a "$LOG"
- if [ $? -ne 0 ]; then
- echo -e "\e[1A\e[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs"
- exit 1
- fi
+ install_package "$PKG1" 2>&1 | tee -a "$LOG"
+ if [ $? -ne 0 ]; then
+ echo -e "\e[1A\e[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs"
+ exit 1
+ fi
done
+printf "${NOTE} Force installing packages...\n"
+for FORCE in "${swww[@]}"; do
+ sudo apt-get --reinstall install -y "$FORCE" 2>&1 | tee -a "$LOG"
+ [ $? -ne 0 ] && { echo -e "\e[1A\e[K${ERROR} - $FORCE Package installation failed, Please check the installation logs"; exit 1; }
+done
+
+printf "\n\n"
+
printf "${NOTE} Installing swww\n"
# Check if swww folder exists
if [ -d "swww" ]; then
- printf "${NOTE} swww folder exists. Pulling latest changes...\n"
- cd swww || exit 1
- git pull origin main 2>&1 | tee -a "$MLOG"
-else
- printf "${NOTE} Cloning swww repository...\n"
- if git clone --recursive -b $swww_tag https://github.com/Horus645/swww.git; then
+ printf "${NOTE} swww folder exists. Pulling latest changes...\n"
cd swww || exit 1
- else
- echo -e "${ERROR} Download failed for swww" 2>&1 | tee -a "$LOG"
- exit 1
- fi
+ git pull origin main 2>&1 | tee -a "$MLOG"
+else
+ printf "${NOTE} Cloning swww repository...\n"
+ if git clone --recursive https://github.com/Horus645/swww.git; then
+ cd swww || exit 1
+ else
+ echo -e "${ERROR} Download failed for swww" 2>&1 | tee -a "$LOG"
+ exit 1
+ fi
fi
-# install new rust
-# Define environment variables for non-interactive installation
-export RUSTUP_INIT_SKIP_PATH_CHECK=yes
-export RUSTUP_INIT_SKIP_CONFIRMATION=yes
-
-# Download and execute the Rust installer script, automatically answering "yes" to all prompts
-curl --proto '=https' --tlsv1.3 https://sh.rustup.rs -sSf | sh -s -- -y --no-modify-path 2>&1 | tee -a "$LOG" || true
-
# Proceed with the rest of the installation steps
source "$HOME/.cargo/env" || true
diff --git a/install-scripts/wallust.sh b/install-scripts/wallust.sh
index 290b72d..a53e1e8 100755
--- a/install-scripts/wallust.sh
+++ b/install-scripts/wallust.sh
@@ -1,14 +1,7 @@
#!/bin/bash
# 💫 https://github.com/JaKooLit 💫 #
-# wallust - pywal colors replacment #
+# wallust - pywal colors replacement #
-depend=(
- librust-jpeg-decoder-dev
- rust
-)
-
-
-## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
# Determine the directory where the script is located
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
@@ -16,46 +9,41 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PARENT_DIR="$SCRIPT_DIR/.."
cd "$PARENT_DIR" || exit 1
+# Source external functions, adjust path as necessary
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
# Set the name of the log file to include the current date and time
LOG="Install-Logs/install-$(date +%d-%H%M%S)_wallust.log"
-MLOG="install-$(date +%d-%H%M%S)_wallust2.log"
-# Installing depencies
-for PKG1 in "${depend[@]}"; do
- install_package "$PKG1" 2>&1 | tee -a "$LOG"
- if [ $? -ne 0 ]; then
- echo -e "\033[1A\033[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs"
- exit 1
- fi
-done
+# Create log directory if it doesn't exist
+mkdir -p "$(dirname "$LOG")"
-##
-printf "${NOTE} Installing wallust from dev branch...\n"
+# Install up-to-date Rust
+echo "Installing most up to Rust compiler..."
+curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y 2>&1 | tee -a "$LOG"
+source "$HOME/.cargo/env"
-# Check if folder exists and remove it
-if [ -d "wallust" ]; then
- printf "${NOTE} Removing existing wallust folder...\n"
- rm -rf "wallust"
+printf "\n%.0s" {1..2}
+
+# Remove any existing Wallust binary
+if [[ -f "/usr/local/bin/wallust" ]]; then
+ echo "Removing existing Wallust binary..." 2>&1 | tee -a "$LOG"
+ sudo rm "/usr/local/bin/wallust"
fi
-# Clone and build wallust
-printf "${NOTE} Installing wallust...\n"
-if git clone --depth 1 https://codeberg.org/explosion-mental/wallust.git; then
- cd wallust || exit 1
- make
- if sudo make install 2>&1 | tee -a "$MLOG" ; then
- printf "${OK} wallust installed successfully.\n" 2>&1 | tee -a "$MLOG"
- else
- echo -e "${ERROR} Installation failed for wallust." 2>&1 | tee -a "$MLOG"
- fi
- #moving the addional logs to Install-Logs directory
- mv $MLOG ../Install-Logs/ || true
- cd ..
+printf "\n%.0s" {1..2}
+
+# Install Wallust using Cargo
+echo "Installing Wallust using Cargo..." | tee -a "$LOG"
+if cargo install wallust 2>&1 | tee -a "$LOG" ; then
+ echo "Wallust installed successfully." | tee -a "$LOG"
+
+ # Move the newly compiled binary to /usr/local/bin
+ echo "Moving Wallust binary to /usr/local/bin..." | tee -a "$LOG"
+ sudo mv "$HOME/.cargo/bin/wallust" /usr/local/bin 2>&1 | tee -a "$LOG"
else
- echo -e "${ERROR} Download failed for wallust." 2>&1 | tee -a "$LOG"
+ echo "Error: Wallust installation failed. Check the log file $LOG for details." | tee -a "$LOG"
+ exit 1
fi
clear
-
diff --git a/install.sh b/install.sh
index 8b3456a..8e8511e 100755
--- a/install.sh
+++ b/install.sh
@@ -161,10 +161,10 @@ execute_script "01-pre-cleanup.sh"
execute_script "00-dependencies.sh"
execute_script "00-hypr-pkgs.sh"
execute_script "fonts.sh"
+execute_script "wallust.sh"
execute_script "imagemagick.sh"
execute_script "swww.sh"
execute_script "rofi-wayland.sh"
-execute_script "wallust.sh"
execute_script "ags.sh"
execute_script "hyprland.sh"
execute_script "hyprlock.sh"
From 61f7e74a80822b9b89c78a057f51865e839cba96 Mon Sep 17 00:00:00 2001
From: "Ja.KooLit"
Date: Sun, 1 Sep 2024 15:31:05 +0900
Subject: [PATCH 4/5] install.sh - Edited to WARN if hyprland failed to install
---
install.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/install.sh b/install.sh
index 8e8511e..490b979 100755
--- a/install.sh
+++ b/install.sh
@@ -245,7 +245,7 @@ if dpkg -l | grep -qw hyprland || dpkg -l | grep -qw hyprland-git; then
fi
else
# Print error message if neither package is installed
- printf "\n${NOTE} Hyprland failed to install. Please check Install-Logs...\n\n"
+ printf "\n${WARN} Hyprland failed to install. Please check Install-Logs...\n\n"
exit 1
fi
From a8617b8b52591b49bf34910d5d5808dfd5f06801 Mon Sep 17 00:00:00 2001
From: JaKooLit
Date: Wed, 4 Sep 2024 11:51:43 +0900
Subject: [PATCH 5/5] added a funnction check for Ubuntu based
---
CHANGELOGS.md | 3 +++
install.sh | 32 ++++++++++++++++++++++++++------
2 files changed, 29 insertions(+), 6 deletions(-)
diff --git a/CHANGELOGS.md b/CHANGELOGS.md
index 774c68d..43d3279 100644
--- a/CHANGELOGS.md
+++ b/CHANGELOGS.md
@@ -1,5 +1,8 @@
## Changelogs
+## 04 Sep 2024
+- added a function to check if it is Ubuntu or Based on Ubuntu and script will exit
+
## 28 Aug 2024
- Added final check if hyprland is installed and will give an error to user
diff --git a/install.sh b/install.sh
index 490b979..2d45411 100755
--- a/install.sh
+++ b/install.sh
@@ -10,28 +10,48 @@ fi
clear
-printf "\n%.0s" {1..3}
+# Function to check if the system is Ubuntu
+is_ubuntu() {
+ # Check for 'Ubuntu' in /etc/os-release
+ if grep -q 'Ubuntu' /etc/os-release; then
+ return 0
+ fi
+ return 1
+}
+
+# Check if the system is Ubuntu
+if is_ubuntu; then
+ echo "This script is NOT intended for Ubuntu / Ubuntu Based. Please read the README for the correct link."
+ exit 1
+fi
+
+clear
+
+# ASCII art
+printf "\n%.0s" {1..3}
echo " | _. |/ _ _ | o _|_ "
echo " \_| (_| o |\ (_) (_) |_ | |_ "
-printf "\n%.0s" {1..2}
+printf "\n%.0s" {1..2}
# Welcome message
echo "$(tput setaf 6)Welcome to JaKooLit's Debian Trixie/SID Hyprland Install Script!$(tput sgr0)"
echo
-echo "$(tput setaf 166)ATTENTION: Run a full system update and Reboot first!! (Highly Recommended) $(tput sgr0)"
+echo "$(tput setaf 166)ATTENTION: Run a full system update and reboot first!! (Highly Recommended)$(tput sgr0)"
echo
-echo "$(tput setaf 3)NOTE: You will be required to answer some questions during the installation! $(tput sgr0)"
+echo "$(tput setaf 3)NOTE: You will be required to answer some questions during the installation!$(tput sgr0)"
echo
-echo "$(tput setaf 3)NOTE: If you are installing on a VM, ensure to enable 3D acceleration else Hyprland wont start! $(tput sgr0)"
+echo "$(tput setaf 3)NOTE: If you are installing on a VM, ensure to enable 3D acceleration; otherwise, Hyprland won't start!$(tput sgr0)"
echo
+# Prompt user to proceed
read -p "$(tput setaf 6)Would you like to proceed? (y/n): $(tput sgr0)" proceed
-if [ "$proceed" != "y" ]; then
+if [[ "$proceed" != "y" ]]; then
echo "Installation aborted."
exit 1
fi
+
read -p "$(tput setaf 6)Have you edited your /etc/apt/sources.list? [Very Important] (y/n): $(tput sgr0)" proceed2
if [ "$proceed2" != "y" ]; then