root / dtools / bin / check-tarball-h-files @ 5d69a524
History | View | Annotate | Download (426 Bytes)
| 1 | #!/bin/bash |
|---|---|
| 2 | |
| 3 | tarball=$1 |
| 4 | if [ "x$tarball" == "x" ] |
| 5 | then |
| 6 | echo "usage: $0 tarball" 1>&2 |
| 7 | exit 1 |
| 8 | fi |
| 9 | |
| 10 | path=${tarball%%.tar.gz}
|
| 11 | |
| 12 | tar tzf $tarball \ |
| 13 | | grep -E '\.(h|py|v)$' \ |
| 14 | | sed -e "s/$path/./" \ |
| 15 | | sort >/tmp/tarball-h-files |
| 16 | |
| 17 | find . \( -name '*.h' -o -name '*.py' \) -print | grep -v ./$path | sort >/tmp/build-h-files |
| 18 | |
| 19 | comm -23 /tmp/build-h-files /tmp/tarball-h-files |
| 20 | |
| 21 | # rm /tmp/tarball-h-files /tmp/build-h-files |
| 22 | |
| 23 |