Skip to content
Snippets Groups Projects
Commit f1d15342 authored by Arseny Kapoulkine's avatar Arseny Kapoulkine
Browse files

Fix archive packaging

Base directory is now using target basename.
parent 10ff488e
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment