github.com/google/go-safeweb@v0.0.0-20231219055052-64d8cfc90fbb/.github/workflows/copyright_linter.sh (about) 1 #!/bin/bash 2 status=0 3 lines=$(cat $1 | wc -l) 4 extension=$2 5 for f in $(find . -name "*.$extension") 6 do 7 diff=$(head -n $lines $f | sed 's/20[0-9][0-9]/YEAR/g' | diff $1 -) 8 if [ ! -z "$diff" ] 9 then 10 echo $f 11 echo "< want, > got" 12 echo "${diff}" 13 echo "" 14 status=1 15 fi 16 done 17 exit $status