]> 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 # Install cron scripts into the appropriate places.
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         foreach $type (qw{daily weekly monthly}) {
12                 $cron=pkgfile($PACKAGE,"cron.$type");
13                 if ($cron) {
14                         if (! -d "$TMP/etc/cron.$type") {
15                                 doit("install","-o","root","-g","root","-d","$TMP/etc/cron.$type");
16                         }
17                         doit("install",$cron,"$TMP/etc/cron.$type/$PACKAGE");
18                 }
19         }
20         # Seperate because this needs to be mode 644.
21         $cron=pkgfile($PACKAGE,"cron.d");
22         if ($cron) {
23                 if (! -d "$TMP/etc/cron.d") {
24                         doit("install","-o","root","-g","root","-d","$TMP/etc/cron.d");
25                 }       
26                 doit("install","-m",644,$cron,"$TMP/etc/cron.d/$PACKAGE");
27         }
28 }