Don Williams 29e8044170 Moved source and builds to build dir
Cleanup is now just removing the build directory and install-logs

 On branch development
 Your branch is up to date with 'origin/development'.

 Changes to be committed:
	modified:   install-scripts/Global_functions.sh
	modified:   install-scripts/ags.sh
	modified:   install-scripts/aquamarine.sh
	modified:   install-scripts/dotfiles-branch.sh
	modified:   install-scripts/gtk_themes.sh
	modified:   install-scripts/hyprcursor.sh
	modified:   install-scripts/hyprgraphics.sh
	modified:   install-scripts/hypridle.sh
	modified:   install-scripts/hyprland-guiutils.sh
	modified:   install-scripts/hyprland-protocols.sh
	modified:   install-scripts/hyprland-qt-support.sh
	modified:   install-scripts/hyprland.sh
	modified:   install-scripts/hyprlang.sh
	modified:   install-scripts/hyprlock.sh
	modified:   install-scripts/hyprpolkitagent.sh
	modified:   install-scripts/hyprtoolkit.sh
	modified:   install-scripts/hyprutils.sh
	modified:   install-scripts/hyprwayland-scanner.sh
	modified:   install-scripts/hyprwire.sh
	modified:   install-scripts/quickshell.sh
	modified:   install-scripts/rofi-wayland.sh
	modified:   install-scripts/rog.sh
	modified:   install-scripts/sddm_theme.sh
	modified:   install-scripts/swww.sh
	modified:   install-scripts/wayland-protocols-src.sh
	modified:   install-scripts/xdph.sh
	modified:   install-scripts/xkbcommon.sh
	modified:   install-scripts/zsh_pokemon.sh
2026-01-23 19:18:26 -05:00

76 lines
2.2 KiB
Bash
Executable File

#!/bin/bash
# 💫 https://github.com/JaKooLit 💫 #
# ASUS ROG ) #
asus=(
power-profiles-daemon
)
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
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" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
# Source the global functions script
if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
echo "Failed to source Global_functions.sh"
exit 1
fi
# Set the name of the log file to include the current date and time
LOG="install-$(date +%d-%H%M%S)_rog.log"
# Installing enhancemet
for PKG1 in "${asus[@]}"; 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
printf " enabling power-profiles-daemon...\n"
sudo systemctl enable power-profiles-daemon 2>&1 | tee -a "$LOG"
# Function to handle the installation and log messages
install_and_log() {
local project_name="$1"
local git_url="$2"
local src_dir="$SRC_ROOT/$project_name"
printf "${NOTE} Installing $project_name\n"
rm -rf "$src_dir"
if git clone "$git_url" "$src_dir"; then
cd "$src_dir" || exit 1
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh 2>&1 | tee -a "$LOG"
source "$HOME/.cargo/env"
make
if sudo make install 2>&1 | tee -a "$LOG"; then
printf "${OK} $project_name installed successfully.\n"
if [ "$project_name" == "supergfxctl" ]; then
# Enable supergfxctl
sudo systemctl enable --now supergfxd 2>&1 | tee -a "$LOG"
fi
else
echo -e "${ERROR} Installation failed for $project_name."
fi
#moving logs into main install-logs
mv $LOG "$PARENT_DIR/Install-Logs/" || true
cd - || exit 1
else
echo -e "${ERROR} Cloning $project_name from $git_url failed."
fi
}
# Download and build asusctl
install_and_log "asusctl" "https://gitlab.com/asus-linux/asusctl.git"
# Download and build supergfxctl
install_and_log "supergfxctl" "https://gitlab.com/asus-linux/supergfxctl.git"
printf "\n%.0s" {1..2}