]> git.ozlabs.org Git - next-scripts/blobdiff - common.sh
introduce get_contacts function and use it
[next-scripts] / common.sh
index 74a31c79ce417bcfcc1f7517ac8e2ef9e42a3f13..5e27d5f90abeef67082e63590b3767317e71f193 100644 (file)
--- a/common.sh
+++ b/common.sh
@@ -8,7 +8,7 @@ _next_common_included=1
 
 bin_dir=$(dirname "$0")
 
-LOG_FILE="../merge.log"
+[ "$LOG_FILE" ] || LOG_FILE="../merge.log"
 SHA1_FILE="../SHA1s"
 CTRL_FILE="../etc/control"
 
@@ -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