+debhelper (0.36) unstable; urgency=low
+
+ * dh_undocumented: exit with an error message if the man page specified
+ does not have a section.
+
+ -- Joey Hess <joeyh@master.debian.org> Sat, 27 Dec 1997 14:14:04 -0500
+
debhelper (0.35) unstable; urgency=low
* dh_lib: use dpkg-parsechangelog instead of parsing it by hand. This
fi
}
+# Returns 1 if the package is a native debian package, null otherwise.
+isnative() {
+ # Get the package version.
+ # Note that the 2>/dev/null is because a bug in dpkg-parsechangelog makes it
+ # output a bogus error message to stderr.
+ # If it actually has a real error, then the expr will fail, and this whole
+ # script will come crashing to a halt, which is good enough to inform
+ # the user something's wrong. :-)
+ VERSION=`expr "\`dpkg-parsechangelog 2>/dev/null\`" : \
+ '.*Version: \(.*\).*Distribution:'`
+ # Is this a native Debian package?
+ if expr "$VERSION" : '.*-' >/dev/null; then
+ return 1
+ fi
+}
+
# Automatically add a shell script snippet to a debian script.
# Only works if the script has #DEBHELPER# in it.
#
esac
done
-# Get the package version.
-# Note that the 2>/dev/null is because a bug in dpkg-parsechangelog makes it
-# output a bogus error message to stderr.
-# If it actually has a real error, then the expr will fail, and this whole
-# script will come crashing to a halt, which is good enough to inform
-# the user something's wrong. :-)
-VERSION=`expr "\`dpkg-parsechangelog 2>/dev/null\`" : '.*Version: \(.*\).*Distribution:'`
-
# Get the name of the main binary package.
MAINPACKAGE=`grep ^Package: debian/control | cut -d " " -f 2 | head -1`
-# Is this a native Debian package?
-if ! expr "$VERSION" : '.*-' >/dev/null; then
- NATIVE=1
-fi
-
if [ "$DH_DOINDEP" -o "$DH_DOARCH" ]; then
# Figure out all the binary packages to be produced, by looking at the
# control file. Break it into 2 lists, INDEP_PACKAGES and ARCH_PACKAGES.
# Determine what directory the file belongs in,
# /usr/man, or /usr/X11R6/man.
- section=`expr "$file" : '.*\.\([123456789]\)'`
+ section=`expr "$file" : '.*\.\([123456789]\)'` \
+ || error "\"$file\" does not have an extention."
if [ `expr "$file" : '.*\.[123456789]\(x\)'` ] ; then
dir=usr/X11R6/man/man$section
reldir=../../../man