]> git.donarmstrong.com Git - debhelper.git/blob
r1013: This commit was manufactured by cvs2svn to create tag
[debhelper.git] /
1 #!/usr/bin/perl -w
2 #
3 # Reads debian/dirs, creates the directories listed there
4
5 BEGIN { push @INC, "debian", "/usr/share/debhelper" }
6 use Dh_Lib;
7 init();
8
9 foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
10         $TMP=tmpdir($PACKAGE);
11         $file=pkgfile($PACKAGE,"dirs");
12
13         if (! -e $TMP) {
14                 doit("install","-d",$TMP);
15         }
16
17         undef @dirs;
18
19         if ($file) {
20                 @dirs=filearray($file)
21         }
22
23         if (($PACKAGE eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
24                 push @dirs, @ARGV;
25         }       
26
27         if (@dirs) {
28                 # Stick the $TMP onto the front of all the dirs.
29                 # This is necessary, for 2 reasons, one to make them 
30                 # be in the right directory, but more importantly, it 
31                 # protects against the danger of absolute dirs being
32                 # specified.
33                 @dirs=map {
34                                 $_="$TMP/$_";
35                                 tr:/:/:s; # just beautification.
36                                 $_
37                           } @dirs;
38
39                 # Create dirs.
40                 doit("install","-d",@dirs);
41         }
42 }