blob: 837c70b54e593262a20aa4e5157063627ef88de1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/bin/bash
# compare filenames in 2 tarballs, except /usr/doc/blah-<version> dirs
# get treated specially.
pkg_name() {
echo "$1" | sed 's,.*/,,' | sed 's,\.[^.]*$,,'
}
list_tar() {
pkg="$( echo $1 | sed 's,\.[^.]*,,' )"
tar tf "$1" | sed 's,usr/doc/[^/]*/,usr/doc/@DOCDIR@/,' | sort > $DIR/$( pkg_name "$1" )
}
DIR=/tmp/pkgdiff.$RANDOM.$$
echo $DIR
mkdir -p $DIR || exit 1
list_tar "$1"
list_tar "$2"
diff $DIR/$( pkg_name "$1" ) $DIR/$( pkg_name "$2" )
rm -rf $DIR
|