2
# © 2011 Cyril Brulebois <kibi@debian.org>
5
### First phase, files known to make dpkg-source unhappy.
7
# List broken symlinks:
8
symlinks=$(find -type l)
10
# Symlinks vs. directories:
15
src/gallium/state_trackers/d3d1x/progs/bin/d3d10tri.exe
16
src/gallium/state_trackers/d3d1x/progs/bin/d3d11gears.exe
17
src/gallium/state_trackers/d3d1x/progs/bin/d3d11spikysphere.exe
18
src/gallium/state_trackers/d3d1x/progs/bin/d3d11tex.exe
19
src/gallium/state_trackers/d3d1x/progs/bin/d3d11tri.exe
20
src/gallium/state_trackers/python/tests/regress/fragment-shader/frag-abs.png
25
"") clean=0; echo "I: No parameter given, listing only (-f to remove).";;
26
"-f") clean=1; echo "I: Removing files.";;
27
*) clean=0; echo "I: Unknown parameter given, listing only (-f to remove).";;
33
for x in $symlinks $dirs_vs_symlinks $binaries; do
34
# Do not fail if the file went away already, only warn:
35
if [ -e $x -o -L $x ]; then
36
if [ $clean = 1 ]; then
39
echo "I: Would remove $x"
42
echo "W: Unable to remove non-existing: $x"
46
### Second phase, kill all files in git not in the tarball
47
version=$(dpkg-parsechangelog|awk '/Version: / {print $2}'|sed 's/-.*$//')
48
tarball="../mesa_$version.orig.tar.gz"
49
if [ ! -f $tarball ]; then
50
echo "E: Missing tarball ($tarball), you could use: uscan --download-current --rename"
54
# Be lazy for now, temporary files would be better:
58
# Strip one directory, Mesa-$version/ is the top-level:
59
tar tfz $tarball | sed 's,[^/]*/,,' | sort > $two
60
# List all files known to git, except those under debian/:
61
git ls-files | grep -v ^debian/ | sort > $one
63
for x in $(diff -u $one $two|tail -n +3|grep ^-|sed 's/^-//'); do
64
if [ -e $x -o -L $x ]; then
65
if [ $clean = 1 ]; then
68
echo "I: Would remove $x"
71
echo "W: Unable to remove non-existing: $x (maybe gone during 1st phase)"