File: list-binary-files.sh

package info (click to toggle)
python-pymzml 2.5.2%2Brepack1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 27,792 kB
  • sloc: python: 6,495; pascal: 341; makefile: 233; sh: 30
file content (34 lines) | stat: -rw-r--r-- 895 bytes parent folder | download | duplicates (2)
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/python3-pymzml/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/python3-pymzml/html/${item}" >> ${topSrcDir}/debian/source/include-binaries
    fi

done

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