|
1
by Luke Yelavich, Martin Pitt, Luke Yelavich
[ Martin Pitt ] |
1 |
#!/bin/bash
|
|
36
by Jonathan Patrick Davies, Jonathan Patrick Davies, Siegfried-Angel Gevatter Pujals
[ Jonathan Patrick Davies ] |
2 |
#
|
|
24
by Stephan Hermann, Michael Bienia, Siegfried-Angel Gevatter Pujals (RainCT), Stephan Hermann, Daniel Holbach, Kees Cook
[ Michael Bienia ] |
3 |
# Copyright 2007 (C) Siegfried-A. Gevatter <rainct@ubuntu.com>
|
|
1
by Luke Yelavich, Martin Pitt, Luke Yelavich
[ Martin Pitt ] |
4 |
# Based upon a script by Martin Pitt <martin.pitt@ubuntu.com>
|
|
36
by Jonathan Patrick Davies, Jonathan Patrick Davies, Siegfried-Angel Gevatter Pujals
[ Jonathan Patrick Davies ] |
5 |
#
|
6 |
# This program is free software; you can redistribute it and/or
|
|
7 |
# modify it under the terms of the GNU General Public License
|
|
8 |
# as published by the Free Software Foundation; either version 3
|
|
9 |
# of the License, or (at your option) any later version.
|
|
10 |
#
|
|
11 |
# This program is distributed in the hope that it will be useful,
|
|
12 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14 |
# GNU General Public License for more details.
|
|
15 |
#
|
|
16 |
# See file /usr/share/common-licenses/GPL for more details.
|
|
|
1
by Luke Yelavich, Martin Pitt, Luke Yelavich
[ Martin Pitt ] |
17 |
#
|
18 |
# This script outputs a list of files which are not common source files. This
|
|
|
19
by Soren Hansen, Cesare Tirabassi, Dainel Holbach, Soren Hansen
[ Cesare Tirabassi ] |
19 |
# should be run in the root of a source tree to find files which might not be
|
20 |
# the "preferred form of modification" that the GPL and other licenses require.
|
|
|
1
by Luke Yelavich, Martin Pitt, Luke Yelavich
[ Martin Pitt ] |
21 |
|
|
19
by Soren Hansen, Cesare Tirabassi, Dainel Holbach, Soren Hansen
[ Cesare Tirabassi ] |
22 |
FILES="*.h *.c *.cc *.cpp *.py *.sh *.txt *.text *.3 *.m4 *.xml *.html *.php \ |
23 |
*.php3 *.php4 *.class *.form *.module *.cfg *.conf *.config *.odt \
|
|
24 |
*.odp *.tex *.sla *.scd Makefile Makefile.am Makefile.in configure \
|
|
25 |
configure.ac *.diff *.debdiff *.patch *.dpatch config.sub config.guess \
|
|
26 |
depcomp *.docbook *.desktop *.menu AUTHORS INSTALL NEWS README TODO \
|
|
27 |
COPYING LICENSE ChangeLog *.ui *.glade *.gladep *.po *.pot *.ts *.pro \
|
|
|
30
by Kees Cook, Siegfried-Angel Gevatter Pujals (RainCT), Daniel Hahler, Kees Cook
[ Siegfried-Angel Gevatter Pujals (RainCT) ] |
28 |
*.svg *.png *.bmp *.gif *.xpm *.hh *.in *.cs *.1 *.2 *.3 *.4 *.5 *.6 \
|
|
77
by Nathan Handler, Nicolas Valcárcel, Andreas Moog, Michael Bienia, Iain Lane, Siegfried-Angel Gevatter Pujals, Luca Falavigna, Nathan Handler
[ Nicolas Valcárcel ] |
29 |
*.7 *.8 *.9 *.hs *.el *.css"
|
|
1
by Luke Yelavich, Martin Pitt, Luke Yelavich
[ Martin Pitt ] |
30 |
|
|
77
by Nathan Handler, Nicolas Valcárcel, Andreas Moog, Michael Bienia, Iain Lane, Siegfried-Angel Gevatter Pujals, Luca Falavigna, Nathan Handler
[ Nicolas Valcárcel ] |
31 |
IGNORE=".bzr CVS .svn debian .git" |
|
1
by Luke Yelavich, Martin Pitt, Luke Yelavich
[ Martin Pitt ] |
32 |
|
33 |
||
34 |
COMMAND=(find ! \( ) |
|
35 |
||
36 |
firstDone=False |
|
37 |
for pattern in $FILES |
|
38 |
do
|
|
39 |
if [[ $firstDone != True ]]; then |
|
40 |
COMMAND+=( -name $pattern); firstDone=True |
|
41 |
else
|
|
42 |
COMMAND+=( -o -name $pattern) |
|
43 |
fi
|
|
44 |
done
|
|
45 |
||
46 |
COMMAND+=( \) \( ) |
|
47 |
||
48 |
firstDone=False |
|
49 |
for pattern in $IGNORE |
|
50 |
do
|
|
51 |
if [[ $firstDone != True ]]; then |
|
52 |
COMMAND+=( -name $pattern -prune); firstDone=True |
|
53 |
else
|
|
54 |
COMMAND+=( -o -name $pattern -prune) |
|
55 |
fi
|
|
56 |
done
|
|
57 |
||
58 |
COMMAND+=( -o -type f -print \)) |
|
59 |
COMMAND="${COMMAND[@]}" |
|
60 |
||
61 |
$COMMAND # Execute the command |