groups: Add a get-groups command to spit out the repo groups

Change-Id: I73d1a6b2fd58a40673211692a6cbab8bd49aa329
diff --git a/setup.sh b/setup.sh
index 4f424e9..8f23bc5 100755
--- a/setup.sh
+++ b/setup.sh
@@ -52,10 +52,15 @@
 
 export PATH="${PATH}:${HOST_OUT}/bin:${ROOTDIR}/build:${ROOTDIR}/board"
 
+function get-groups
+{
+    git --git-dir="${ROOTDIR}/.repo/manifests.git" config \
+        --get manifest.groups
+}
+
 function is-internal
 {
-    local groups=$(git --git-dir="${ROOTDIR}/.repo/manifests.git" config \
-                       --get manifest.groups)
+    local groups="$(get-groups)"
     echo "${groups}" | grep -qe '.*internal.*'
 }