~jenkaas-hackers/pbuilderjenkins/trunk

« back to all changes in this revision

Viewing changes to hooks/A10checklicense3party.in

  • Committer: Tarmac
  • Author(s): Víctor R. Ruiz
  • Date: 2013-07-18 18:21:18 UTC
  • mfrom: (117.1.3 pbuilderjenkins-3rdparty)
  • Revision ID: tarmac-20130718182118-oejntv3kkozf0t14
Avoid egrep from exiting silently in set -e mode.

Approved by PS Jenkins bot, Francis Ginther.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
includefiles="\.(c(c|pp|xx)?|h(h|pp|xx)?|p(l|m)|php|py(|x)|java|js|vala|qml)$"
30
30
notallowed="(No copyright|UNKNOWN)"
31
 
required="(License granted by Canonical Limited)"
32
 
issues=`licensecheck --noconf -r * --copyright -m -c $includefiles | egrep "$notallowed" | egrep -v "$required"`
33
 
issuescount=`echo "$issues" | wc -l`
 
31
# TODO: required="(License granted by Canonical Limited)"
 
32
issuescount=`licensecheck --noconf -r * --copyright -m -c $includefiles | {{ egrep "$notallowed" || true; }} | wc -l`
34
33
 
35
34
if [ $issuescount -eq 0 ]; then
36
35
    echo No license problems found.
37
36
    exit 0
38
37
else
39
38
    echo Found $issuescount license problems:
40
 
    echo "$issues"
 
39
    licensecheck --noconf -r * --copyright -m -c $includefiles | {{ egrep "$notallowed" || true; }}
41
40
    exit 1
42
41
fi
43
42