From 741a8657bf68fed581c1f2e7078b85164a4e7c77 Mon Sep 17 00:00:00 2001 From: rhuan-pk Date: Mon, 31 Jul 2023 05:23:30 -0300 Subject: [PATCH] Feat: added automatic flexibility for regular and root user. --- install-i3lock-color.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/install-i3lock-color.sh b/install-i3lock-color.sh index 7dcb6682..9ca7c8e6 100755 --- a/install-i3lock-color.sh +++ b/install-i3lock-color.sh @@ -1,11 +1,14 @@ #!/bin/bash LICENSE='/usr/share/licenses/i3lock-color/LICENSE' +SUDO='sudo' + +[ "$UID" -eq 0 ] && unset SUDO ./build.sh cd build -sudo make install -sudo install -Dm644 ../LICENSE "$LICENSE" +$SUDO make install +$SUDO install -Dm644 ../LICENSE "$LICENSE" echo "i3lock-color installed. The binary and manpage listing are \`i3lock'. The license can be found at $LICENSE