File: remove-ignored-manpages.sh

package info (click to toggle)
libpdf-api2-perl 2.019-1%2Bdeb7u1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 20,264 kB
  • sloc: perl: 42,313; sh: 23; makefile: 9
file content (21 lines) | stat: -rwxr-xr-x 543 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

set -eu

# Remove manpages for modules listed in debian/ignored-manpages from package
# installation drectory
#
# See also debian/ignore-manpage.sh

TMP=${TMP:-debian/tmp}

cat debian/ignored-manpages \
| while read md5 mod; do
    FILE="lib/`echo PDF::API2::${mod} | sed 's,::,/,g'`.pm"
    CHECK_MD5=`md5sum $FILE | cut -f1 -d ' '`
    if [ "$md5" = "$CHECK_MD5" ]; then
        rm "$TMP/usr/share/man/man3/PDF::API2::${mod}.3pm"
    else
        echo WARNING: Checksum mismatch for module ${mod}. Manpage not removed
    fi
done