internal-warning: Adjust the warning to use groups instead of files.

Change-Id: I4fd8437c5bdc2b1e97edcc4bb001c47eb1dcc050
diff --git a/setup.sh b/setup.sh
index 7a62cf0..b47b0e9 100755
--- a/setup.sh
+++ b/setup.sh
@@ -52,6 +52,13 @@
 
 export PATH="${PATH}:${HOST_OUT}/bin:${ROOTDIR}/build:${ROOTDIR}/board"
 
+function is-internal
+{
+    local groups=$(git --git-dir=$ROOTDIR/.repo/manifests.git config \
+                       --get manifest.groups)
+    echo $groups |grep -qe '.*internal.*'
+}
+
 function compile-changelogs
 {
     find $ROOTDIR/packages -name changelog |compile_changelogs.py
@@ -138,7 +145,7 @@
     fi
 fi
 
-if [[ -f "${ROOTDIR}/INTERNAL_NOTICE.md" ]]; then
+if is-internal; then
     echo
     echo '*** WARNING: Your repo configuration includes closed-source internal'
     echo '*** repositories. Please watch your step when you contribute code.'