#!/usr/bin/perl -w # # Reads debian/dirs, creates the directories listed there use strict; use Debian::Debhelper::Dh_Lib; init(); foreach my $package (@{$dh{DOPACKAGES}}) { my $tmp=tmpdir($package); my $file=pkgfile($package,"dirs"); if (! -e $tmp) { doit("install","-d",$tmp); } my @dirs; if ($file) { @dirs=filearray($file) } if (($package eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) { push @dirs, @ARGV; } if (@dirs) { # Stick the $tmp onto the front of all the dirs. # This is necessary, for 2 reasons, one to make them # be in the right directory, but more importantly, it # protects against the danger of absolute dirs being # specified. @dirs=map { $_="$tmp/$_"; tr:/:/:s; # just beautification. $_ } @dirs; # Create dirs. doit("install","-d",@dirs); } }