~ci-train-bot/unity8/unity8-ubuntu-zesty-2373

« back to all changes in this revision

Viewing changes to tests/copyright/check_copyright.sh

  • Committer: Albert Astals Cid
  • Date: 2017-02-02 16:19:55 UTC
  • mto: This revision was merged to the branch mainline in revision 2845.
  • Revision ID: albert.astals@canonical.com-20170202161955-gcpurqgow6oskmhj
Enable the license check

And tweak it to skip some files
And add missing licenses to some other files

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
2
 
3
3
#
4
 
# Copyright (C) 2013 Canonical Ltd
 
4
# Copyright (C) 2017 Canonical Ltd
5
5
#
6
6
# This program is free software: you can redistribute it and/or modify
7
7
# it under the terms of the GNU General Public License version 3 as
15
15
# You should have received a copy of the GNU General Public License
16
16
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
17
#
18
 
# Authored by: Michi Henning <michi.henning@canonical.com>
19
 
#
20
18
 
21
19
#
22
20
# Check that, somewhere in the first 30 lines of each file, the string "Copyright" (case independent) appears.
33
31
[ $# -lt 1 ] && usage
34
32
[ $# -gt 2 ] && usage
35
33
 
36
 
ignore_pat="\\.sci$"
 
34
# image files
 
35
ignore_pat="\\.sci$|\\.svg$|\\.png$|\\.jpg$"
 
36
# git/bzr files
 
37
ignore_pat="$ignore_pat|/\\.bzr/|\\.bzrignore$|\\.gitignore$|/\\.bazaar/Makefile$|/\\.bzr-builddeb/default\\.conf$"
 
38
# info files
 
39
ignore_pat="$ignore_pat|/README$|/CODING$|/LGPL_EXCEPTION\\.txt$"
 
40
# cmake files
 
41
ignore_pat="$ignore_pat|/CMakeLists\\.txt$|\\.cmake$"
 
42
# card creator test files
 
43
ignore_pat="$ignore_pat|/cardcreator/.*\\.res$|/cardcreator/.*\\.res\\.cardcreator$|/cardcreator/.*\\.tst$"
 
44
# project files
 
45
ignore_pat="$ignore_pat|/\\.project$|/\\.pydevproject$|/\\.settings/|/\\.crossbuilder/"
 
46
# test desktop files
 
47
ignore_pat="$ignore_pat|/tests/.*/.*\\.desktop$"
 
48
# xml files
 
49
ignore_pat="$ignore_pat|\\.xml$"
 
50
# /data/ files
 
51
ignore_pat="$ignore_pat|/data/.*\\.conf$|/data/.*\\.in|/data/.*\\.url-dispatcher$|/data/.*\\.pkla$"
 
52
# polkit files
 
53
ignore_pat="$ignore_pat|\\.pkla$"
 
54
# /debian/ files
 
55
ignore_pat="$ignore_pat|/debian/"
 
56
# qmldir files
 
57
ignore_pat="$ignore_pat|/qmldir$"
 
58
# Doxygen files
 
59
ignore_pat="$ignore_pat|/Doxyfile.in$"
 
60
# Wizard license files
 
61
ignore_pat="$ignore_pat|/Wizard/licenses/.*\\.html$"
 
62
# qrc files
 
63
ignore_pat="$ignore_pat|\\.qrc$"
 
64
# the doc devices.conf file
 
65
ignore_pat="$ignore_pat|/doc/devices\\.conf$"
37
66
 
38
67
#
39
68
# We don't use the -i option of licensecheck to add ignore_dir to the pattern because Jenkins creates directories