From 797f8e8cb1dda2eec19e566f2258934a25081524 Mon Sep 17 00:00:00 2001 From: Manuel Palenzuela Date: Tue, 22 Oct 2019 01:12:33 +0100 Subject: [PATCH] Added root check in install script --- install.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/install.sh b/install.sh index 7be1a26..a8fc3cd 100755 --- a/install.sh +++ b/install.sh @@ -6,6 +6,11 @@ CUSTOM_DIR="$MODULES_DIR/custom" DWMBARRC="$CONFIG_DIR/dwmbarrc" DWMBAR="/usr/bin/dwmbar" +if [ "$EUID" -ne 0 ] + then echo "Please run as root" + exit 0 +fi + if [[ ! -f "dwmbar" ]]; then echo "dwmbar executable not found." fi