summaryrefslogtreecommitdiff
path: root/dtools/bin/check-tarball-h-files
blob: f94832c2d77d3d8c0024bbb52e286104ce648d90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash

tarball=$1
if [ "x$tarball" == "x" ]
then
  echo "usage: $0 tarball" 1>&2
  exit 1
fi

path=${tarball%%.tar.gz}

tar tzf $tarball  \
  | grep -E '\.(h|py|v)$'   \
  | sed -e "s/$path/./"  \
  | sort >/tmp/tarball-h-files

find . \( -name '*.h' -o -name '*.py' \) -print | grep -v ./$path | sort >/tmp/build-h-files

comm -23 /tmp/build-h-files /tmp/tarball-h-files

# rm /tmp/tarball-h-files /tmp/build-h-files