summaryrefslogtreecommitdiff
path: root/dh_installcron
diff options
context:
space:
mode:
authorAurelien Jarno <aurel32@debian.org>2023-08-14 21:07:54 +0200
committerAurelien Jarno <aurel32@debian.org>2023-08-14 21:07:54 +0200
commit259ab8a0d17d9846ae80a157b6636e9d22be131a (patch)
tree8ee3751f62004a10458ece2ef29566b356bcaeac /dh_installcron
parent76669f0e65fa2b7bf70d2a1293be591c38d0caba (diff)
parent2998eb8dfc6d0e62ad0269ff9184d2ef1c334196 (diff)
Record debhelper (13.11.5) in archive suite sid
Diffstat (limited to 'dh_installcron')
-rwxr-xr-xdh_installcron25
1 files changed, 13 insertions, 12 deletions
diff --git a/dh_installcron b/dh_installcron
index 5e5851c1..9325b0ef 100755
--- a/dh_installcron
+++ b/dh_installcron
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
=head1 NAME
@@ -7,8 +7,11 @@ dh_installcron - install cron scripts into etc/cron.*
=cut
use strict;
+use warnings;
use Debian::Debhelper::Dh_Lib;
+our $VERSION = DH_BUILTIN_VERSION;
+
=head1 SYNOPSIS
B<dh_installcron> [S<B<debhelper options>>] [B<--name=>I<name>]
@@ -28,6 +31,8 @@ cron scripts.
=item debian/I<package>.cron.monthly
+=item debian/I<package>.cron.yearly
+
=item debian/I<package>.cron.hourly
=item debian/I<package>.cron.d
@@ -53,26 +58,22 @@ as the package name.
init();
-# PROMISE: DH NOOP WITHOUT cron.hourly cron.daily cron.weekly cron.monthly cron.d
+# PROMISE: DH NOOP WITHOUT cron.hourly cron.daily cron.weekly cron.monthly cron.yearly cron.d cli-options()
foreach my $package (@{$dh{DOPACKAGES}}) {
my $tmp=tmpdir($package);
- foreach my $type (qw{hourly daily weekly monthly}) {
+ foreach my $type (qw{hourly daily weekly monthly yearly}) {
my $cron=pkgfile($package,"cron.$type");
if ($cron) {
- if (! -d "$tmp/etc/cron.$type") {
- doit("install","-o",0,"-g",0,"-d","$tmp/etc/cron.$type");
- }
- doit("install",$cron,"$tmp/etc/cron.$type/".pkgfilename($package));
+ install_dir("$tmp/etc/cron.$type");
+ install_prog($cron,"$tmp/etc/cron.$type/".pkgfilename($package));
}
}
- # Seperate because this needs to be mode 644.
+ # Separate because this needs to be mode 644.
my $cron=pkgfile($package,"cron.d");
if ($cron) {
- if (! -d "$tmp/etc/cron.d") {
- doit("install","-o",0,"-g",0,"-d","$tmp/etc/cron.d");
- }
- doit("install","-m",644,$cron,"$tmp/etc/cron.d/".pkgfilename($package));
+ install_dir("$tmp/etc/cron.d");
+ install_file($cron,"$tmp/etc/cron.d/".pkgfilename($package));
}
}