From f1d15342102f7cb9741489901787148fd62844d0 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Fri, 10 Apr 2015 20:38:47 -0700 Subject: Fix archive packaging Base directory is now using target basename. --- tests/archive.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/archive.pl b/tests/archive.pl index 0a03b23..76484f7 100644 --- a/tests/archive.pl +++ b/tests/archive.pl @@ -2,11 +2,12 @@ use Archive::Tar; use Archive::Zip; +use File::Basename; my $target = shift @ARGV; my @sources = @ARGV; -my $basedir = ($target =~ /^(.*)(\.zip|\.tar.gz|\.tgz)$/) ? "$1/" : ''; +my $basedir = basename($target, ('.zip', '.tar.gz', '.tgz')) . '/'; my $zip = $target =~ /\.zip$/; my $arch = $zip ? Archive::Zip->new : Archive::Tar->new; -- cgit v1.2.3