summaryrefslogtreecommitdiff
path: root/dh_elpa
diff options
context:
space:
mode:
Diffstat (limited to 'dh_elpa')
-rwxr-xr-xdh_elpa26
1 files changed, 12 insertions, 14 deletions
diff --git a/dh_elpa b/dh_elpa
index c1cdb5c..b62d387 100755
--- a/dh_elpa
+++ b/dh_elpa
@@ -10,6 +10,7 @@ use strict;
use Cwd qw{ getcwd };
use File::Temp qw{tempfile};
use IO::Handle;
+require File::Path;
use Debian::Debhelper::Dh_Lib;
@@ -151,6 +152,15 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
}
my $pkg_file;
+ my $cwd = getcwd();
+ my $tempdir = "${cwd}/debian/.debhelper/elpa";
+
+ File::Path::rmtree $tempdir ||
+ error "cleaning $tempdir";
+
+ File::Path::make_path $tempdir ||
+ error "creating $tempdir";
+
if (scalar(@files) == 1) {
my $pkg_file=$files[0];
@@ -158,23 +168,11 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
'--eval',"(add-to-list 'package-directory-list \"$dhelpadir\")",
'--eval',"(add-to-list 'package-directory-list \"$elpadir\")",
qw{-f package-initialize -l dh-elpa.el},
- qw{-f dhelpa-batch-install-file}, "$tmp/$elpadir", $pkg_file);
-
+ qw{-f dhelpa-batch-install-file}, "$tmp/$elpadir", $pkg_file, $tempdir);
} else {
- my $cwd = getcwd();
- my $tempdir = "${cwd}/debian/.debhelper/elpa";
my $stagedir = "$tempdir/$elpapkg";
- {
- require File::Path;
- File::Path::rmtree $tempdir ||
- error "cleaning $tempdir";
-
- File::Path::make_path $tempdir ||
- error "creating $tempdir";
-
- File::Path::make_path $stagedir ||
+ File::Path::make_path $stagedir ||
error "creating $stagedir";
- }
# copy files into stagedir, flattening hierarchy
# TODO: do this more correctly