File: list-binary-files.sh

package info (click to toggle)
python-pymzml 0.7.6-dfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 66,128 kB
  • ctags: 335
  • sloc: python: 2,428; makefile: 142; sh: 38
file content (34 lines) | stat: -rw-r--r-- 904 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh

topSrcDir="$PWD"

if [ ! -d "debian" ]
then 
    echo "Not located in the top source directory."
    exit 1
fi

# printf "${topSrcDir}\n"

# Remove the old file, that is, we overwrite it now.
rm -vf "${topSrcDir}/debian/source/include-binaries"

cd "${topSrcDir}/debian/python-pymzml-doc/usr/share/doc/python-pymzml-doc/html" || exit 1


for item in $(find -type f)
do
    fileType=$(file -b ${item} | awk '{print $1}')

    if [ "${fileType}" = "PNG" ] || \
           [ "${fileType}" = "GIF" ] || \
           [ "${fileType}" = "PDF" ] || \
           [ "${fileType}" = "data" ]
    then
        echo "debian/python-pymzml-doc/usr/share/doc/python-pymzml-doc/html/${item}" >> ${topSrcDir}/debian/source/include-binaries
    fi

done

# Finally add the pdf file itself:
echo "debian/python-pymzml-doc/usr/share/doc/python-pymzml-doc/pymzml.pdf" >> ${topSrcDir}/debian/source/include-binaries