diff --git a/add_licenses.sh b/add_licenses.sh new file mode 100755 index 000000000..2d1d460e7 --- /dev/null +++ b/add_licenses.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# This script adds license headers that are missing from go files + + +if ! command -v addlicense 2> /dev/null +then + echo "error addlicense must be installed with this command: go install github.com/google/addlicense@latest" && exit 1 +else + echo 'addlicense -v -f license_header.txt **/*.go' + addlicense -v -f license_header.txt $(find . -not -path '*/\.*' -not -path '*/vendor/*' -name '*.go') +fi + +