]> git.ozlabs.org Git - next-scripts/blobdiff - common.sh
introduce get_contacts function and use it
[next-scripts] / common.sh
index 827015a0190347ec25cfcb863eecc466ef13e8ae..5e27d5f90abeef67082e63590b3767317e71f193 100644 (file)
--- a/common.sh
+++ b/common.sh
@@ -47,4 +47,10 @@ export NEXT_GCC_PPC_VERSION="$gcc_ppc_version"
 export NEXT_GCC_PPCLE_VERSION="$gcc_ppcle_version"
 export NEXT_J_FACTOR="$j_factor"
 
+# Support functions
+get_contacts()
+{
+       awk -F '\t' '/^[^#]/ && $3=="'"$1"'" { print $1; }' $CTRL_FILE
+}
+
 true