summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdh_elpa15
1 files changed, 11 insertions, 4 deletions
diff --git a/dh_elpa b/dh_elpa
index dec995e..3ca503e 100755
--- a/dh_elpa
+++ b/dh_elpa
@@ -109,11 +109,18 @@ sub maybe_install_helper{
if (! -d "$ecdest/$piece") {
doit("install","-d","$ecdest/$piece");
}
- Debian::Debhelper::Dh_Lib::autoscript_sed (sub {s/#ELPAPACKAGE#/$desc->{'ELPA-Package'}/;
- s/#ELPAVERSION#/$desc->{'ELPA-Version'}/; },
- "$templatedir/$piece", $target);
+ unlink $target; # ignore errors
+
+ my $elpapackage = $desc->{'ELPA-Name'} or
+ error "elpa package name not found";
- chmod $mode, $target;
+ my $elpaversion = $desc->{'ELPA-Version'} or
+ error "elpa version not found";
+
+ Debian::Debhelper::Dh_Lib::autoscript_sed (sub {s/#ELPAPACKAGE#/$elpapackage/;
+ s/#ELPAVERSION#/$elpaversion/; },
+ "$templatedir/$piece", $target);
+ chmod oct($mode), $target;
}
}