File: dh_testversion.in

package info (click to toggle)
debhelper 0.79hamm1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 332 kB
  • ctags: 6
  • sloc: sh: 578; makefile: 156; perl: 111
file content (23 lines) | stat: -rw-r--r-- 468 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh -e
#
# Debhelper version check.

# Current version of debhelper is:
DH_VERSION=#DEBHELPER_VERSION#

PATH=debian:$PATH:/usr/lib/debhelper
. dh_lib

if [ "$1" -a "$2" ]; then
	compare=$1
	ver=$2
elif [ "$1" ]; then
	compare=">="
	ver=$1
fi

if [ "$compare" -a "$ver" ] ; then
	if ! dpkg --compare-versions $DH_VERSION $compare $ver; then
		error "debhelper version $DH_VERSION is installed, but a version $compare $ver is needed to build this package."
	fi
fi