From e6b90e607b5df421652bef9811037efffee4c770 Mon Sep 17 00:00:00 2001 From: Michiel Scholten Date: Tue, 29 Jul 2014 17:02:30 +0200 Subject: [PATCH] Check root and make sure we are in the right dir --- bin/numix_color_blue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bin/numix_color_blue b/bin/numix_color_blue index 96667f1..ab9f788 100755 --- a/bin/numix_color_blue +++ b/bin/numix_color_blue @@ -1,5 +1,13 @@ #!/bin/bash +# Make sure only root can run our script +if [[ $EUID -ne 0 ]]; then + echo "This script must be run as root" 1>&2 + exit 1 +fi + +cd /usr/share/themes + if [ ! -d "Numix Daily" ]; then echo "Numix theme not found!" exit 1