github.com/go-kivik/kivik/v4@v4.3.2/kiviktest/script/check-license.sh (about) 1 #!/bin/bash 2 3 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 4 5 lines=$(wc -l "${DIR}/header.txt" | cut -d' ' -f1) 6 7 find . -name '*.go' | while read file; do 8 diff <(head -n $lines "${file}") "${DIR}/header.txt" >/dev/null || { 9 echo "${file} missing license" 10 exit 1 11 } 12 done