summaryrefslogtreecommitdiff
path: root/dh_elpa
diff options
context:
space:
mode:
authorDavid Bremner <bremner@debian.org>2015-09-12 20:54:39 -0300
committerDavid Bremner <bremner@debian.org>2015-09-12 22:23:15 -0300
commit2e2a935033fd8254f172db7c3c73b0b2837c74dd (patch)
tree6e487f54e51e0f1591fba12f9d835655cbbe76c9 /dh_elpa
parent70dca91cadaa3939a2028bd0c479dae6e17cd385 (diff)
do nothing if not given any files in pkg.elpa or on command line
Diffstat (limited to 'dh_elpa')
-rwxr-xr-xdh_elpa29
1 files changed, 16 insertions, 13 deletions
diff --git a/dh_elpa b/dh_elpa
index c84f94c..f622442 100755
--- a/dh_elpa
+++ b/dh_elpa
@@ -108,24 +108,12 @@ if ($dh{BYTECOMPILE}) {
$elpadir=$dhelpadir;
}
+PACKAGE:
foreach my $package (@{$dh{DOPACKAGES}}) {
my $tmp=tmpdir($package);
my $file=pkgfile($package,"elpa");
- if ($dh{BYTECOMPILE}) {
- maybe_install_helper($package,'compat','0644');
- maybe_install_helper($package,'install','0755');
- maybe_install_helper($package,'remove','0755');
-
- if (! $dh{NOSCRIPTS}) {
- autoscript($package,"postinst","postinst-emacsen",
- "s/#PACKAGE#/$package/");
- autoscript($package,"prerm","prerm-emacsen",
- "s/#PACKAGE#/$package/");
- }
- }
-
my $elpapkg=$package;
# TODO do this more sanely or at least allow an override
$elpapkg =~ s/^elpa-//;
@@ -146,6 +134,21 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
push @files, @ARGV;
}
+ next PACKAGE if (scalar(@files) == 0);
+
+ if ($dh{BYTECOMPILE}) {
+ maybe_install_helper($package,'compat','0644');
+ maybe_install_helper($package,'install','0755');
+ maybe_install_helper($package,'remove','0755');
+
+ if (! $dh{NOSCRIPTS}) {
+ autoscript($package,"postinst","postinst-emacsen",
+ "s/#PACKAGE#/$package/");
+ autoscript($package,"prerm","prerm-emacsen",
+ "s/#PACKAGE#/$package/");
+ }
+ }
+
my $pkg_file;
if (scalar(@files) == 1) {
$pkg_file=$files[0];