#!/usr/bin/env bash HYPRSOLUS_PATH="/usr/src/hyprsolus" HYPRSOLUSCTL_PATH="/usr/local/bin" if [[ $(id -u) -ne 0 ]] then echo "Please run script with root privilages." exit 1 fi if [[ -d "$HYPRSOLUS_PATH" ]] then echo "hyprsolus already installed on system. If you wish to update hyprsolus,"\ " then please run: hyprsolusctl update." exit 0 fi [[ ! -d "$HOME/.config/systemd/user" ]] && mkdir -p "$HOME/.config/systemd/user" echo "(hyprsolus) Installing hyprsolus to system." sudo git clone --depth=1 https://git.closedless.xyz/TheOnePath/hyprsolus.git \ "$HYPRSOLUS_PATH" exit_code=$? [[ $exit_code -ne 0 ]] && exit 1 echo "(hyprsolus) Moving additional scripts to system." sudo cp -u "${HYPRSOLUS_PATH}/hyprsolusctl" "$HYPRSOLUSCTL_PATH" sudo cp -ru "${HYPRSOLUS_PATH}/systemd" "$HOME/.config/systemd/" echo "(hyprsolus) Installing the dependencies to system." sudo sh "${HYPRSOLUS_PATH}/requirements.sh"