mirror of
https://github.com/JaKooLit/Debian-Hyprland.git
synced 2025-12-21 10:20:12 +01:00
AGS to install only if not installed with v1.9.0
This commit is contained in:
parent
706479e512
commit
195970bcbc
@ -13,12 +13,17 @@ set -e
|
|||||||
OK="$(tput setaf 2)[OK]$(tput sgr0)"
|
OK="$(tput setaf 2)[OK]$(tput sgr0)"
|
||||||
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
|
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
|
||||||
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
|
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
|
||||||
|
INFO="$(tput setaf 4)[INFO]$(tput sgr0)"
|
||||||
WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
|
WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
|
||||||
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
|
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
|
||||||
MAGENTA=$(tput setaf 5)
|
MAGENTA="$(tput setaf 5)"
|
||||||
WARNING=$(tput setaf 1)
|
ORANGE="$(tput setaf 214)"
|
||||||
YELLOW=$(tput setaf 3)
|
WARNING="$(tput setaf 1)"
|
||||||
RESET=$(tput sgr0)
|
YELLOW="$(tput setaf 3)"
|
||||||
|
GREEN="$(tput setaf 2)"
|
||||||
|
BLUE="$(tput setaf 4)"
|
||||||
|
SKY_BLUE="$(tput setaf 6)"
|
||||||
|
RESET="$(tput sgr0)"
|
||||||
|
|
||||||
|
|
||||||
# Function for installing packages
|
# Function for installing packages
|
||||||
|
|||||||
@ -1,6 +1,16 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# 💫 https://github.com/JaKooLit 💫 #
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
# Aylur's GTK Shell #
|
# Aylur's GTK Shell v 1.9.0 #
|
||||||
|
# for desktop overview
|
||||||
|
|
||||||
|
# Check if AGS is installed
|
||||||
|
if command -v ags &>/dev/null; then
|
||||||
|
AGS_VERSION=$(ags -v | awk '{print $NF}')
|
||||||
|
if [[ "$AGS_VERSION" == "1.9.0" ]]; then
|
||||||
|
echo -e "${OK} ${MAGENTA}Aylur's GTK Shell v1.9.0${RESET} is already installed. Skipping installation."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
ags=(
|
ags=(
|
||||||
node-typescript
|
node-typescript
|
||||||
@ -33,21 +43,24 @@ source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
|||||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_ags.log"
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_ags.log"
|
||||||
MLOG="install-$(date +%d-%H%M%S)_ags2.log"
|
MLOG="install-$(date +%d-%H%M%S)_ags2.log"
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
|
||||||
|
# Installation of main components
|
||||||
|
printf "\n%s - Installing ${BLUE}Aylur's GTK shell $ags_tag${RESET} Dependencies \n" "${NOTE}"
|
||||||
|
|
||||||
# Installing ags Dependencies
|
# Installing ags Dependencies
|
||||||
for PKG1 in "${ags[@]}"; do
|
for PKG1 in "${ags[@]}"; do
|
||||||
install_package "$PKG1" 2>&1 | tee -a "$LOG"
|
install_package "$PKG1" "$LOG"
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo -e "\033[1A\033[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs"
|
echo -e "\033[1A\033[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
#install typescript by npm
|
printf "\n%.0s" {1..1}
|
||||||
sudo npm install --global typescript 2>&1 | tee -a "$LOG"
|
|
||||||
|
|
||||||
# ags
|
# ags v1
|
||||||
|
printf "${NOTE} Install and Compiling ${BLUE}Aylur's GTK shell $ags_tag${RESET}..\n"
|
||||||
printf "${NOTE} Install and Compiling Aylurs GTK shell $ags_tag.. \n"
|
|
||||||
|
|
||||||
# Check if folder exists and remove it
|
# Check if folder exists and remove it
|
||||||
if [ -d "ags" ]; then
|
if [ -d "ags" ]; then
|
||||||
@ -55,24 +68,26 @@ if [ -d "ags" ]; then
|
|||||||
rm -rf "ags"
|
rm -rf "ags"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Clone nwg-look repository with the specified tag
|
printf "\n%.0s" {1..1}
|
||||||
|
printf "${INFO} Kindly Standby...cloning and compiling ${BLUE}Aylur's GTK shell $ags_tag${RESET}...\n"
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
# Clone repository with the specified tag and capture git output into MLOG
|
||||||
if git clone --recursive -b "$ags_tag" --depth 1 https://github.com/Aylur/ags.git; then
|
if git clone --recursive -b "$ags_tag" --depth 1 https://github.com/Aylur/ags.git; then
|
||||||
cd ags || exit 1
|
cd ags || exit 1
|
||||||
# Build and install ags
|
npm install
|
||||||
npm install
|
meson setup build
|
||||||
meson setup build
|
if sudo meson install -C build 2>&1 | tee -a "$MLOG"; then
|
||||||
if sudo meson install -C build 2>&1 | tee -a "$MLOG"; then
|
printf "\n${OK} ${YELLOW}Aylur's GTK shell $ags_tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG"
|
||||||
printf "${OK} ags installed successfully.\n" 2>&1 | tee -a "$MLOG"
|
else
|
||||||
else
|
echo -e "\n${ERROR} ${YELLOW}Aylur's GTK shell $ags_tag${RESET} Installation failed\n " 2>&1 | tee -a "$MLOG"
|
||||||
echo -e "${ERROR} Installation failed for ags" 2>&1 | tee -a "$MLOG"
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
# Move logs to Install-Logs directory
|
# Move logs to Install-Logs directory
|
||||||
mv "$MLOG" ../Install-Logs/ || true
|
mv "$MLOG" ../Install-Logs/ || true
|
||||||
cd ..
|
cd ..
|
||||||
else
|
else
|
||||||
echo -e "${ERROR} Failed to download ags Please check your connection" 2>&1 | tee -a "$LOG"
|
echo -e "\n${ERROR} Failed to download ${YELLOW}Aylur's GTK shell $ags_tag${RESET} Please check your connection\n" 2>&1 | tee -a "$LOG"
|
||||||
mv "$MLOG" ../Install-Logs/ || true
|
mv "$MLOG" ../Install-Logs/ || true
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..2}
|
||||||
Loading…
x
Reference in New Issue
Block a user