mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +00:00
62 lines
2.0 KiB
Bash
Executable File
62 lines
2.0 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Copyright 2007 (C) Siegfried-A. Gevatter <rainct@ubuntu.com>
|
|
# Based upon a script by Martin Pitt <martin.pitt@ubuntu.com>
|
|
#
|
|
# This program is free software; you can redistribute it and/or
|
|
# modify it under the terms of the GNU General Public License
|
|
# as published by the Free Software Foundation; either version 3
|
|
# of the License, or (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# See file /usr/share/common-licenses/GPL for more details.
|
|
#
|
|
# This script outputs a list of files which are not common source files. This
|
|
# 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 \
|
|
configure.ac *.diff *.debdiff *.patch *.dpatch config.sub config.guess \
|
|
depcomp *.docbook *.desktop *.menu AUTHORS INSTALL NEWS README TODO \
|
|
COPYING LICENSE ChangeLog *.ui *.glade *.gladep *.po *.pot *.ts *.pro \
|
|
*.svg *.png *.bmp *.gif *.xpm *.hh *.in *.cs *.1 *.2 *.3 *.4 *.5 *.6 \
|
|
*.7 *.8 *.9 *.hs *.el *.css"
|
|
|
|
IGNORE=".bzr CVS .svn debian .git"
|
|
|
|
|
|
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[@]}"
|
|
|
|
$COMMAND # Execute the command
|