File: check_all_licenses.sh

package info (click to toggle)
cryptominisat 5.11.4%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,432 kB
  • sloc: cpp: 55,148; ansic: 9,642; python: 8,899; sh: 1,336; php: 477; sql: 403; javascript: 173; xml: 34; makefile: 15
file content (21 lines) | stat: -rwxr-xr-x 661 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/bash
set -e
set -x

check_license_fnames() {
    #license check -- first print and then fail in case of problems
    find $1 -type f -name $2 -exec ../utils/licensecheck/licensecheck.pl -m {} \;
    NUM=$(find $1 -type f -name $2 -exec ../utils/licensecheck/licensecheck.pl -m {} \; | grep UNK | wc -l)
    shopt -s extglob
    NUM="${NUM##*( )}"
    NUM="${NUM%%*( )}"
    shopt -u extglob
    if [ "$NUM" -ne 0 ]; then
        echo "There are some files without license information!"
        exit -1
    fi
}

check_license_fnames ../tests/ CMakeLists.txt
check_license_fnames ../src/ CMakeLists.txt
check_license_fnames ../scripts/ CMakeLists.txt