revert back previous

This commit is contained in:
JaKooLit
2024-01-01 19:36:02 +09:00
parent fe60a6129e
commit 38e3430c64
23 changed files with 614 additions and 467 deletions

30
install-scripts/dotfiles.sh Executable file → Normal file
View File

@@ -1,10 +1,16 @@
#!/bin/bash
# 💫 https://github.com/JaKooLit 💫 #
# Hyprland-Dots to download from Releases #
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
############## WARNING DO NOT EDIT BEYOND THIS LINE if you dont know what you are doing! ######################################
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
# 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)
printf "${NOTE} Downloading / Checking for existing Hyprland-Dots.tar.gz...\n"
@@ -30,14 +36,14 @@ if [ -f Hyprland-Dots.tar.gz ]; then
echo -e "${WARN} Hyprland-Dots.tar.gz is outdated (Existing version: $existing_version, Latest version: $latest_version)."
read -p "Do you want to upgrade to the latest version? (y/n): " upgrade_choice
if [ "$upgrade_choice" = "y" ]; then
echo -e "${NOTE} Proceeding to download the latest release." 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log"
echo -e "${NOTE} Proceeding to download the latest release."
# Delete existing directories starting with JaKooLit-Hyprland-Dots
find . -type d -name 'JaKooLit-Hyprland-Dots*' -exec rm -rf {} +
rm -f Hyprland-Dots.tar.gz
printf "${WARN} Removed existing Hyprland-Dots.tar.gz.\n"
else
echo -e "${NOTE} User chose not to upgrade. Exiting..." 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log"
echo -e "${NOTE} User chose not to upgrade. Exiting..."
exit 0
fi
fi
@@ -50,7 +56,7 @@ latest_tag=$(curl -s https://api.github.com/repos/JaKooLit/Hyprland-Dots/release
# Check if the tag is obtained successfully
if [ -z "$latest_tag" ]; then
echo -e "${ERROR} Unable to fetch the latest tag information." 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log"
echo -e "${ERROR} Unable to fetch the latest tag information."
exit 1
fi
@@ -59,7 +65,7 @@ latest_tarball_url=$(curl -s https://api.github.com/repos/JaKooLit/Hyprland-Dots
# Check if the URL is obtained successfully
if [ -z "$latest_tarball_url" ]; then
echo -e "${ERROR} Unable to fetch the tarball URL for the latest release." 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log"
echo -e "${ERROR} Unable to fetch the tarball URL for the latest release."
exit 1
fi
@@ -84,12 +90,10 @@ if curl -L "$latest_tarball_url" -o "$file_name"; then
# Set execute permission for copy.sh and execute it
chmod +x copy.sh
./copy.sh
./copy.sh 2>&1 | tee -a "../install-$(date +'%d-%H%M%S')_dots.log"
echo -e "${OK} Latest Dotfiles release downloaded, extracted, and processed successfully. Check JaKooLit-Hyprland-Dots folder for more detailed install logs" 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log"
echo -e "${OK} Latest source code release downloaded, extracted, and processed successfully."
else
echo -e "${ERROR} Failed to download the latest Dotfiles release." 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log"
echo -e "${ERROR} Failed to download the latest source code release."
exit 1
fi
clear