keycloak-scim/distribution/licenses-common/check-licenses.sh

25 lines
544 B
Bash
Raw Normal View History

2017-12-18 13:38:45 +00:00
#!/bin/bash
MODULES=`readlink -f $1`
LICENSES=`readlink -f $2`
for i in `find $MODULES -name '*.jar'`; do
if ( unzip -l $i | grep pom.properties &>/dev/null ); then
unzip -p $i '*/pom.properties' > /tmp/pom.properties
source /tmp/pom.properties &>/dev/null
if [ ! -f $LICENSES/$groupId\,$artifactId\,$version,* ]; then
echo "Missing: "
echo "group: $groupId"
echo "artifact: $artifactId"
2017-12-18 13:38:45 +00:00
echo "version: $version"
echo "---------------------"
fi
else
echo "Not Maven: $i"
echo "---------------------"
fi
done