2007-08-04 00:49:38 +02:00
|
|
|
#!/bin/bash
|
2008-01-17 19:43:26 +01:00
|
|
|
# Copyright 2007 (C) Siegfried-A. Gevatter <rainct@ubuntu.com>
|
2007-08-04 00:49:38 +02:00
|
|
|
# Based upon a script by Martin Pitt <martin.pitt@ubuntu.com>
|
2007-08-07 16:05:50 +02:00
|
|
|
# License: GPLv3 or later
|
2007-07-09 16:17:24 +01:00
|
|
|
#
|
2007-08-04 13:52:30 +02:00
|
|
|
# This script outputs a list of files which are not common source files. This
|
2007-10-21 11:16:39 +02:00
|
|
|
# should be run in the root of a source tree to find files which might not be
|
|
|
|
# the "preferred form of modification" that the GPL and other licenses require.
|
|
|
|
|
|
|
|
FILES="*.h *.c *.cc *.cpp *.py *.sh *.txt *.text *.3 *.m4 *.xml *.html *.php \
|
|
|
|
*.php3 *.php4 *.class *.form *.module *.cfg *.conf *.config *.odt \
|
|
|
|
*.odp *.tex *.sla *.scd Makefile Makefile.am Makefile.in configure \
|
2007-10-21 11:53:01 +02:00
|
|
|
configure.ac *.diff *.debdiff *.patch *.dpatch config.sub config.guess \
|
2007-10-21 11:16:39 +02:00
|
|
|
depcomp *.docbook *.desktop *.menu AUTHORS INSTALL NEWS README TODO \
|
|
|
|
COPYING LICENSE ChangeLog *.ui *.glade *.gladep *.po *.pot *.ts *.pro \
|
2008-05-02 15:29:15 +02:00
|
|
|
*.svg *.png *.bmp *.gif *.xpm *.hh *.in *.cs *.1 *.2 *.3 *.4 *.5 *.6 \
|
|
|
|
*.7 *.8 *.9"
|
2007-08-04 00:49:38 +02:00
|
|
|
|
|
|
|
IGNORE=".bzr CVS .svn debian"
|
|
|
|
|
|
|
|
|
|
|
|
COMMAND=(find ! \( )
|
|
|
|
|
|
|
|
firstDone=False
|
|
|
|
for pattern in $FILES
|
|
|
|
do
|
|
|
|
if [[ $firstDone != True ]]; then
|
|
|
|
COMMAND+=( -name $pattern); firstDone=True
|
|
|
|
else
|
|
|
|
COMMAND+=( -o -name $pattern)
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
COMMAND+=( \) \( )
|
|
|
|
|
|
|
|
firstDone=False
|
|
|
|
for pattern in $IGNORE
|
|
|
|
do
|
|
|
|
if [[ $firstDone != True ]]; then
|
|
|
|
COMMAND+=( -name $pattern -prune); firstDone=True
|
|
|
|
else
|
|
|
|
COMMAND+=( -o -name $pattern -prune)
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
COMMAND+=( -o -type f -print \))
|
|
|
|
COMMAND="${COMMAND[@]}"
|
2007-07-09 16:17:24 +01:00
|
|
|
|
2007-08-04 00:49:38 +02:00
|
|
|
$COMMAND # Execute the command
|