Added install script
An installation script to download hyprsolus to the system.
This commit is contained in:
parent
eefae516b2
commit
7e51e14548
31
install.sh
Normal file
31
install.sh
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
#!/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"
|
||||||
Loading…
Reference in New Issue
Block a user