mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-14 00:21:08 +00:00
Rewrote suspicious-source
This commit is contained in:
parent
35e3a0be26
commit
8a755560ad
6
README
6
README
@ -10,3 +10,9 @@ check-symbols <package> [<directory>]
|
||||
what-patch
|
||||
... will check what patching system is used by a package.
|
||||
You need to be in it's source directory in order that it works.
|
||||
|
||||
suspicious-source
|
||||
... will output 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 'prefered form of modification' that the GPL and other
|
||||
licenses require.
|
||||
|
@ -1,12 +1,48 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
# Author: Martin Pitt <martin.pitt@ubuntu.com>
|
||||
# License: GPL v2 or later
|
||||
#!/bin/bash
|
||||
# Copyright 2007 (C) Siegfried-A. Gevatter <rainct@ubuntuwire.com>
|
||||
# Based upon a script by Martin Pitt <martin.pitt@ubuntu.com>
|
||||
# License: GPL v3 or later
|
||||
#
|
||||
# Output a list of files which are not common source files. This
|
||||
# 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 'prefered form of modification' that the GPL and other
|
||||
# licenses require.
|
||||
|
||||
find -type f ! \( -name '*.h' -o -name '*.c' -o -name '*.cc' -o -name '*.cpp' -o -name Makefile -o -name configure -o -name '*.3' -o -name '*.html' -o -name '*.txt' -o -name '*.xml' -o -name Makefile.am -o -name Makefile.in -o -name '*.m4' -o -name config.sub -o -name config.guess -o -name ltmain.sh -o -name depcomp -o -name configure.ac -o -name *.py -o -name NEWS -o -name README -o -name INSTALL -o -name TODO -o -name ChangeLog -o -name '*.docbook' -o -name '*.png' -o -name '*.desktop' -o -name '*.ui' -o -name '*.po' -o -name '*.py' -o -name '*.svg' -o -name '*.bmp' -o -name '*.gif' -o -name '*.pot' -o -name '*.xpm' -o -name '*.glade' -o -name '*.gladep' \)
|
||||
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"
|
||||
|
||||
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[@]}"
|
||||
|
||||
$COMMAND # Execute the command
|
||||
|
Loading…
x
Reference in New Issue
Block a user