#! /bin/bash groups=`grep -rni "ssh:" $1 | sed 's/^.*name="//; s/".*$//'` for group in $groups do if grep -rni "remote=" $1 | grep -Fq $group; then if grep -Fq $group $2; then continue else echo "ERROR: License mismatch between source and artifacts" exit 1 fi fi done