]> git.donarmstrong.com Git - debhelper.git/blob - dh_md5sums
r11: Initial revision
[debhelper.git] / dh_md5sums
1 #!/bin/sh -e
2 #
3 # Generate a DEBIAN/md5sums file, that lists the md5sums of all
4 # non-conffiles in the package
5
6 PATH=debian:$PATH:/usr/lib/debhelper
7 . dh_lib
8
9 for PACKAGE in $DH_DOPACKAGES; do
10         TMP=`tmpdir $PACKAGE`
11
12         if [ ! -d "debian/$TMP/DEBIAN" ]; then
13                 doit "install -d debian/$TMP/DEBIAN"
14         fi
15
16         doit "pushd debian/$TMP" >/dev/null
17         # Doit isn't smart enough to hande this next command so echo by hand. (sigh)
18         verbose_echo 'md5sum `find * -type f ! -regex "^DEBIAN/.*"` > DEBIAN/md5sums </dev/null'
19         md5sum `find * -type f ! -regex "^DEBIAN/.*"` >DEBIAN/md5sums </dev/null
20         doit "chown root.root DEBIAN/md5sums"
21         doit "popd 2>/dev/null" >/dev/null 
22 done