]> git.donarmstrong.com Git - debhelper.git/blob - dh_testdir
r499: * dh_strip: run file using a safe pipe open, that will not expose any weird
[debhelper.git] / dh_testdir
1 #!/usr/bin/perl -w
2
3 =head1 NAME
4
5 dh_testdir - test directory before building debian package
6
7 =cut
8
9 use strict;
10 use Debian::Debhelper::Dh_Lib;
11
12 =head1 SYNOPSIS
13
14 B<dh_testdir> [S<I<debhelper options>>] [S<I<file ...>>]
15
16 =head1 DESCRIPTION
17
18 dh_testdir tries to make sure that you are in the correct directory when
19 building a debian package. It makes sure that the file debian/control
20 exists, as well as any other files you specify. If not,
21 it exits with an error.
22
23 =head1 OPTIONS
24
25 =over 4
26
27 =item I<file ...>
28
29 Test for the existence of these files too.
30
31 =back
32
33 =cut
34
35 init();
36
37 foreach my $file ('debian/control', @ARGV) {
38         if (! -e $file) {
39                 error("\"$file\" not found. Are you sure you are in the correct directory?");
40         }
41 }
42
43 =head1 SEE ALSO
44
45 L<debhelper(1)>
46
47 This program is a part of debhelper.
48
49 =head1 AUTHOR
50
51 Joey Hess <joeyh@debian.org>
52
53 =cut