Commit 224e32bc authored by Mike Danese's avatar Mike Danese

make godep licenses/copyright check case insensitive

parent 56200d16
...@@ -57,13 +57,13 @@ process_content () { ...@@ -57,13 +57,13 @@ process_content () {
# Sadly inconsistent in the wild, but mostly license files # Sadly inconsistent in the wild, but mostly license files
# containing copyrights, but no readme/notice files containing # containing copyrights, but no readme/notice files containing
# licenses (except to "see license file") # licenses (except to "see license file")
ensure_pattern="License|Copyright" ensure_pattern="license|copyright"
;; ;;
# We search READMEs for copyrights and this includes notice files as well # We search READMEs for copyrights and this includes notice files as well
# Look in as many places as we find files matching # Look in as many places as we find files matching
COPYRIGHT) find_names=(-iname 'notice*' -o -iname 'readme*') COPYRIGHT) find_names=(-iname 'notice*' -o -iname 'readme*')
find_maxdepth=3 find_maxdepth=3
ensure_pattern="Copyright" ensure_pattern="copyright"
;; ;;
esac esac
...@@ -97,7 +97,7 @@ process_content () { ...@@ -97,7 +97,7 @@ process_content () {
if [[ -z "${CONTENT[${index}]-}" ]]; then if [[ -z "${CONTENT[${index}]-}" ]]; then
for f in ${local_files[@]-}; do for f in ${local_files[@]-}; do
# Find some copyright info in any file and break # Find some copyright info in any file and break
if egrep -wq "${ensure_pattern}" "${f}"; then if egrep -i -wq "${ensure_pattern}" "${f}"; then
CONTENT[${index}]="${f}" CONTENT[${index}]="${f}"
break break
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment