From 65f6dd0af485a61354b75e190858df17d51159d3 Mon Sep 17 00:00:00 2001 From: Hanna Skairipa Date: Fri, 6 Feb 2026 14:18:40 -0700 Subject: [PATCH] Implement user privilege check for dependencies installation Add conditional installation of dependencies based on user privileges. --- Install-Nilla.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Install-Nilla.sh b/Install-Nilla.sh index de23117..d4f49a7 100644 --- a/Install-Nilla.sh +++ b/Install-Nilla.sh @@ -16,7 +16,18 @@ cd NILLA_TEMP git clone $NILLA_REPO cd Nilla -./Install-Dependencies.sh + +if [ "$EUID" -eq 0 ]; then + ./Install-Dependencies.sh +else + if command -v sudo &> /dev/null; then + sudo ./Install-Dependencies.sh + else + echo "Please install sudo and add yourself to sudoers" + fi +fi + +endif rm -rf $HOME/.config/hypr cp -r ./hypr $HOME/.config/