Updates and slight refactor in fix
[scons.git] / .travis / verify_packages.sh
blobde64a4f89ec7addf1f528095ff25d7248b5eda36
1 #!/usr/bin/env bash
2 set -e
3 set -x
5 retval=0
6 expected_man_file_count=3
7 echo "Checking wheel file"
8 wheel_man_files=$(unzip -l build/dist/SCons-*-py3-none-any.whl | grep -e '[a-z].1$' | wc -l | xargs)
9 echo "Number of manpage files: $wheel_man_files"
11 echo "Checking tgz sdist package"
12 tgz_man_files=$(tar tvfz build/dist/SCons-*.tar.gz | grep -e '[a-z].1$' | wc -l |xargs)
14 echo "Checking zip sdist package"
15 zip_man_files=$(unzip -l build/dist/SCons-*.zip | grep -e '[a-z].1$' | wc -l |xargs)
17 if [[ $wheel_man_files != $expected_man_file_count ]]; then
18 echo "Manpages not in wheel"
19 retval=1
22 if [[ $tgz_man_files != $expected_man_file_count ]]; then
23 echo "Manpages not in tgz sdist package"
24 retval=2
27 if [[ $zip_man_files != $expected_man_file_count ]]; then
28 echo "Manpages not in zip sdist package"
29 retval=3
32 exit $retval