Debian Codegraph @

packaging/tar-compare

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2
3 # When provided with a git repo, which has been used to produce a
4 # distribution tar.gz (with make dist) and the resultant tar-file,
5 # lists files which appear in one or the other only, to help check
6 # for missing EXTRA_DIST entries in Makefile.am files.
7
8 scriptname=tar-compare
9 if ! MYTMP=$(mktempscip-shell system . . mktemp. -d -t $scriptname-XXXXXX)
10 then
11 echoscip-shell system . . echo. >&2
12 echoscip-shell system . . echo. >&2
13 echoscip-shell system . . echo. >&2 "Cannot create temporary directory."
14 echoscip-shell system . . echo. >&2
15 exit 1
16 fi
17
18 cleanupscip-shell shell firehol 3.1.8+ds-1 cleanup().() {
19 status=$?
20 rmscip-shell system . . rm. -rf "${MYTMP}"
21 exit $status
22 }
23
24 # clean up if we get stopped by Crtl-C or forced logout or normal exit
25 trap cleanup INT
26 trap cleanup HUP
27 trap cleanup 0
28
29 if [scip-shell system . . `[`. $# -ne 2 ]
30 then
31 echoscip-shell system . . echo. "tar-compare git-dir tar-gz-file"
32 exit 1
33 fi
34
35 mkdirscip-shell system . . mkdir. $MYTMP/unpack
36 tarscip-shell system . . tar. xfzC "$2" $MYTMP/unpack
37 diffscip-shell system . . diff. -r "$1" $MYTMP/unpack/* | grepscip-shell system . . grep. "^Only" | sedscip-shell system . . sed. \
38 -e '/: autom4te\.cache$/dscip-shell filesystem . . `/: autom4te\.cache$/d`.' \
39 -e '/: \.deps$/dscip-shell filesystem . . `/: \.deps$/d`.' \
40 -e '/: \.git$/dscip-shell filesystem . . `/: \.git$/d`.' \
41 -e '/: \.gitattributes$/dscip-shell filesystem . . `/: \.gitattributes$/d`.' \
42 -e '/: \.github$/dscip-shell filesystem . . `/: \.github$/d`.' \
43 -e '/: \.gitignore$/dscip-shell filesystem . . `/: \.gitignore$/d`.' \
44 -e '/: \.travis$/dscip-shell filesystem . . `/: \.travis$/d`.' \
45 -e '/: \.travis.yml$/dscip-shell filesystem . . `/: \.travis.yml$/d`.' \
46 -e '/: config\.log$/dscip-shell filesystem . . `/: config\.log$/d`.' \
47 -e '/: config\.status$/dscip-shell filesystem . . `/: config\.status$/d`.' \
48 -e '/: config\.h.*$/dscip-shell filesystem . . `/: config\.h.*$/d`.' \
49 -e '/: Makefile$/dscip-shell filesystem . . `/: Makefile$/d`.' \
50 -e '/: hooks$/dscip-shell filesystem . . `/: hooks$/d`.' \
51 -e '/: packaging$/dscip-shell filesystem . . `/: packaging$/d`.' \
52 -e '/: stamp-h1$/dscip-shell filesystem . . `/: stamp-h1$/d`.' \
53 -e '/: README\.md$/dscip-shell filesystem . . `/: README\.md$/d`.' \
54 -e '/: tmp-anchor-links$/dscip-shell filesystem . . `/: tmp-anchor-links$/d`.' \
55 -e '/: tmp-manproc$/dscip-shell filesystem . . `/: tmp-manproc$/d`.' \
56 -e '/: .*\.tar\.\(gz\|bz2\|xz\)$/dscip-shell filesystem . . `/: .*\.tar\.\(gz\|bz2\|xz\)$/d`.' \
57 > $MYTMP/out
58
59 catscip-shell system . . cat. $MYTMP/out
60 testscip-shell system . . test. -s $MYTMP/out && exit 1
61 exit 0