diff options
author | joey <joey> | 1999-08-17 04:56:24 +0000 |
---|---|---|
committer | joey <joey> | 1999-08-17 04:56:24 +0000 |
commit | e348bcc96f206a25afc2ad1d4f004c74b7f8ab37 (patch) | |
tree | 6e7a8eb3621fc7b4ba2727b187e4a6a7b9c321cd /dh_testversion | |
parent | aec37078c45ab2dc23bfb7bb9bde2c5d130d663f (diff) | |
download | debhelper-e348bcc96f206a25afc2ad1d4f004c74b7f8ab37.tar.gz |
r104: Initial Import
Diffstat (limited to 'dh_testversion')
-rwxr-xr-x | dh_testversion | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/dh_testversion b/dh_testversion new file mode 100755 index 00000000..57c0e588 --- /dev/null +++ b/dh_testversion @@ -0,0 +1,24 @@ +#!/usr/bin/perl -w +# +# Debhelper version check. + +BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +use Dh_Lib; +use Dh_Version; # contains the version number of debhelper. +init(); + +my($compare, $ver); + +if ($#ARGV > 0) { + $compare=shift; + $ver=shift; +} +elsif ($#ARGV eq 0) { + $compare=">="; + $ver=shift; +} + +if (defined $compare and defined $ver) { + system('dpkg','--compare-versions',$Dh_Version::version,$compare,$ver) == 0 || + error("debhelper version $Dh_Version::version is installed, but a version $compare $ver is needed to build this package."); +} |