Initial commit
[profile/ivi/fontpackages.git] / private / core-fonts-report
1 #!/bin/sh
2 # Tests if an ELF file tries to load core fonts, and reports the result
3
4 if  $(nm -aDu "$3" 2> /dev/null | grep -q  '\<XLoad.*Font') ; then
5
6   [ -s "$1" -a -r "$1" ] && rpminfo=$(cat "$1") || rpminfo="||||||"
7   [ -s "$2" -a -r "$2" ] && rpmlint_score=$(cat "$2")
8
9   size=$(du -b "$3" | cut -f 1)
10   checksum=$(sha256sum "$3" | cut -d " " -f 1)
11
12   if [ -s "$4" -a -r "$4" ] ; then
13     file=$(cut -d "|" -f 1 < "$4")
14     type=$(cut -d "|" -f 2 < "$4")
15   fi
16
17   echo "$rpminfo|$rpmlint_score|$file||||||$type|$size|$checksum||||||X"
18 fi