Skip to content

Commit

Permalink
Update licenses
Browse files Browse the repository at this point in the history
  • Loading branch information
rdsubhas committed Nov 8, 2018
1 parent 4c5a9b7 commit 9753bfc
Show file tree
Hide file tree
Showing 2 changed files with 8,991 additions and 4,315 deletions.
9 changes: 5 additions & 4 deletions bin/cross-compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,21 @@ version=${1?"version is required"}
echo $version >> "tmp/version"

# Generate license notices
go mod vendor
deps="github.com/goeuro/myke $(go list -f '{{ join .Deps "\n"}}' ./... | grep -v 'goeuro/myke')"
out="tmp/LICENSES"
echo -e "OPEN SOURCE LICENSES\n" > $out

for dep in $deps; do
if [ -d "$GOPATH/src/$dep" ]; then
notices=$(ls -d $GOPATH/src/$dep/* 2>/dev/null | grep -i -e "license" -e "licence" -e "copying" -e "notice" || echo)
if [ -d "vendor/$dep" ]; then
notices=$(ls -d vendor/$dep/* 2>/dev/null | grep -i -e "license" -e "licence" -e "copying" -e "notice" || echo)
if [ ! -z "$notices" ]; then
echo -e "$dep\n\n" >> $out
echo -e "BEGIN LICENSE FOR $dep\n\n" >> $out
for notice in $notices; do
echo "Adding license: $notice"
cat $notice >> $out
done
echo -e "\n\n" >> $out
echo -e "\nEND LICENSE FOR $dep\n\n" >> $out
fi
fi
done
Expand Down
Loading

0 comments on commit 9753bfc

Please sign in to comment.