Updated install.sh
Removed sudo command as script requires sudo privileges. Fixed systemd pathspec.
This commit is contained in:
parent
cbf75a8195
commit
29d87242e4
16
install.sh
16
install.sh
|
|
@ -5,7 +5,7 @@ home="/home/$user"
|
||||||
|
|
||||||
HYPRSOLUS_PATH="/usr/src/hyprsolus"
|
HYPRSOLUS_PATH="/usr/src/hyprsolus"
|
||||||
HYPRSOLUSCTL_PATH="/usr/local/bin"
|
HYPRSOLUSCTL_PATH="/usr/local/bin"
|
||||||
HYPRSOLUS_SYSTEMD="$home/.config/systemd/user"
|
HYPRSOLUS_SYSTEMD="$home/.config"
|
||||||
|
|
||||||
if [[ $(id -u) -ne 0 ]]
|
if [[ $(id -u) -ne 0 ]]
|
||||||
then
|
then
|
||||||
|
|
@ -22,22 +22,22 @@ fi
|
||||||
[[ ! -d "$HYPRSOLUS_SYSTEMD" ]] && mkdir -p "$HYPRSOLUS_SYSTEMD"
|
[[ ! -d "$HYPRSOLUS_SYSTEMD" ]] && mkdir -p "$HYPRSOLUS_SYSTEMD"
|
||||||
|
|
||||||
echo "(hyprsolus) Installing hyprsolus to system."
|
echo "(hyprsolus) Installing hyprsolus to system."
|
||||||
sudo git clone --depth=1 https://git.closedless.xyz/TheOnePath/hyprsolus.git \
|
git clone --depth=1 https://git.closedless.xyz/TheOnePath/hyprsolus.git \
|
||||||
"$HYPRSOLUS_PATH"
|
"$HYPRSOLUS_PATH"
|
||||||
exit_code=$?
|
exit_code=$?
|
||||||
[[ $exit_code -ne 0 ]] && exit 1
|
[[ $exit_code -ne 0 ]] && exit 1
|
||||||
sudo chown -R "$user:$user" "$HYPRSOLUS_PATH"
|
chown -R "$user:$user" "$HYPRSOLUS_PATH"
|
||||||
|
|
||||||
echo "(hyprsolus) Moving additional scripts to system."
|
echo "(hyprsolus) Moving additional scripts to system."
|
||||||
sudo cp -u "${HYPRSOLUS_PATH}/hyprsolusctl" "$HYPRSOLUSCTL_PATH"
|
cp -u "${HYPRSOLUS_PATH}/hyprsolusctl" "$HYPRSOLUSCTL_PATH"
|
||||||
# Make the file executable
|
# Make the file executable
|
||||||
sudo chmod +x "${HYPRSOLUS_PATH}/hyprsolusctl"
|
chmod +x "${HYPRSOLUS_PATH}/hyprsolusctl"
|
||||||
sudo chown root:root "${HYPRSOLUS_PATH}/hyprsolusctl"
|
chown root:root "${HYPRSOLUS_PATH}/hyprsolusctl"
|
||||||
|
|
||||||
sudo cp -ru "${HYPRSOLUS_PATH}/systemd" "$HYPRSOLUS_SYSTEMD"
|
cp -ru "${HYPRSOLUS_PATH}/systemd" "$HYPRSOLUS_SYSTEMD"
|
||||||
echo "(hyprsolus) Setting up systemd units."
|
echo "(hyprsolus) Setting up systemd units."
|
||||||
systemctl --user -M "$user"@ enable --now \
|
systemctl --user -M "$user"@ enable --now \
|
||||||
"${HYPRSOLUS_SYSTEMD}/hyprsolus-check.timer"
|
"${HYPRSOLUS_SYSTEMD}/hyprsolus-check.timer"
|
||||||
|
|
||||||
echo "(hyprsolus) Installing the dependencies to system."
|
echo "(hyprsolus) Installing the dependencies to system."
|
||||||
sudo sh "${HYPRSOLUS_PATH}/requirements.sh"
|
sh "${HYPRSOLUS_PATH}/requirements.sh"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user