From d66eedaf0046eff40603c696d6af13977117a5b5 Mon Sep 17 00:00:00 2001
From: hemanth <hemanth.hm@gmail.com>
Date: Fri, 17 Sep 2010 21:57:02 +0800
Subject: [PATCH] Fixed a major issue with sudo user check\!

---
 ubuntu-setup.bash | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ubuntu-setup.bash b/ubuntu-setup.bash
index 67b602abee..24f4af871d 100644
--- a/ubuntu-setup.bash
+++ b/ubuntu-setup.bash
@@ -8,7 +8,8 @@
 shopt -s extglob
 
 # Check if the user has sudo privileges.
-[[ $( id -u) ]] && echo "$(whoami) has no sudo permissions on this machine" && exit 1
+sudo -v >/dev/null 2>&1 || { echo $(whoami) has no sudo privileges ; exit 1; }
+
 
 # Install build tools 
 echo "Installing build tools.."
-- 
GitLab