[debhelper-devel] [debhelper] 01/01: dh_systemd_enable: Prefer install_* to doit('install', ...)
Niels Thykier
nthykier at moszumanska.debian.org
Sun Oct 2 20:17:52 UTC 2016
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository debhelper.
commit bc446dacfa2c9507581c6fe5754241b975afc3f0
Author: Niels Thykier <niels at thykier.net>
Date: Sun Oct 2 20:17:15 2016 +0000
dh_systemd_enable: Prefer install_* to doit('install', ...)
Signed-off-by: Niels Thykier <niels at thykier.net>
---
dh_systemd_enable | 48 ++++++++++++++----------------------------------
1 file changed, 14 insertions(+), 34 deletions(-)
diff --git a/dh_systemd_enable b/dh_systemd_enable
index 064adc8..7a0621e 100755
--- a/dh_systemd_enable
+++ b/dh_systemd_enable
@@ -140,71 +140,51 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
my $service=pkgfile($package,"service");
if ($service ne '') {
my $path="$tmpdir/lib/systemd/system";
- if (! -d "$path") {
- doit("install","-d","$path");
- }
+ install_dir($path);
- doit("install","-p","-m644",$service,"$path/$script.service");
+ install_file($service, "$path/$script.service");
}
my $template=pkgfile("$package@","service");
if ($template ne '') {
my $path="$tmpdir/lib/systemd/system";
- if (! -d "$path") {
- doit("install","-d","$path");
- }
-
- doit("install","-p","-m644",$template,"$path/$script at .service");
+ install_dir($path);
+ install_file($template, "$path/$script at .service");
}
my $target=pkgfile($package,"target");
if ($target ne '') {
my $path="$tmpdir/lib/systemd/system";
- if (! -d "$path") {
- doit("install","-d","$path");
- }
-
- doit("install","-p","-m644",$target,"$path/$script.target");
+ install_dir($path);
+ install_file($target, "$path/$script.target");
}
my $socket=pkgfile($package,"socket");
if ($socket ne '') {
my $path="$tmpdir/lib/systemd/system";
- if (! -d "$path") {
- doit("install","-d","$path");
- }
-
- doit("install","-p","-m644",$socket,"$path/$script.socket");
+ install_dir($path);
+ install_file($socket, "$path/$script.socket");
}
my $tmpfile=pkgfile($package,"tmpfile");
if ($tmpfile ne '') {
my $path="$tmpdir/usr/lib/tmpfiles.d";
- if (! -d "$path") {
- doit("install","-d","$path");
- }
-
- doit("install","-p","-m644",$tmpfile,"$path/$script.conf");
+ install_dir($path);
+ install_file($tmpfile, "$path/$script.conf");
}
my $mount=pkgfile($package,"mount");
if ($mount ne '') {
my $path="$tmpdir/usr/lib/system";
- if (! -d "$path") {
- doit("install","-d","$path");
- }
-
- doit("install","-p","-m644",$mount,"$path/$script.mount");
+ install_dir($path);
+ install_file($mount, "$path/$script.mount");
}
my $pathunit=pkgfile($package,"path");
if ($pathunit ne '') {
my $path="$tmpdir/lib/systemd/system";
- if (! -d "$path") {
- doit("install","-d","$path");
- }
-
- doit("install","-p","-m644",$pathunit,"$path/$script.path");
+ install_dir($path);
+ install_file($pathunit, "$path/$script.path");
}
find({
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git
More information about the debhelper-devel
mailing list