]> git.ozlabs.org Git - next-scripts/blobdiff - common.sh
update to_build_host a bit
[next-scripts] / common.sh
index 9f18277ca57cc1b8d782514d27724bb851f1dfdd..8e9f484d13ef16939ab16216807ace2330d6c5ac 100644 (file)
--- a/common.sh
+++ b/common.sh
@@ -54,4 +54,29 @@ get_contacts()
        awk -F '\t' '/^[^#]/ && $3=="'"$1"'" { print $1; }' $CTRL_FILE
 }
 
+get_url()
+{
+       awk -F '\t' '/^[^#]/ && $3=="'"$1"'" { print $4; }' $CTRL_FILE
+}
+
+get_build_flag()
+{
+       awk -F '\t' '/^[^#]/ && $3=="'"$1"'" { print $6; }' $CTRL_FILE
+}
+
+check_unmerged_files()
+{
+       local tree="$1"
+       local um_files
+       local rm_files
+
+       um_files=$(git diff 2>&1 | sed -n 's/^\* Unmerged path //p')
+       if [ "$um_files" ] && [ -f "../merge-files/$tree" ]; then
+               rm_files=$(grep -F "$um_files" "../merge-files/$tree")
+               if [ "$rm_files" ]; then
+                       "$bin_dir/do_rm" $rm_files
+               fi
+       fi
+}
+
 true