This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
get the dir name from the tarball filename
authorJesse Luehrs <doy@tozt.net>
Mon, 18 Jun 2012 20:57:41 +0000 (15:57 -0500)
committerJesse Luehrs <doy@tozt.net>
Mon, 18 Jun 2012 22:10:26 +0000 (17:10 -0500)
Filter::Util::Call comes from Filter-x.yz.tar.gz for instance, which
untars to Filter-x.yz, not Filter-Util-Call-x.yz as it was previously
assuming

Porting/sync-with-cpan

index f85e50e..2c66f85 100755 (executable)
@@ -220,7 +220,6 @@ else {
 }
 
 my  $old_dir      = "$pkg_dir-$old_version";
-my  $new_dir      = "$pkg_dir-$new_version";
 
 say "Cleaning out old directory";
 system git => 'clean', '-dfxq', $pkg_dir;
@@ -228,6 +227,7 @@ system git => 'clean', '-dfxq', $pkg_dir;
 say "Unpacking $new_file";
 
 system tar => 'xfz', $new_file;
+(my $new_dir = $new_file) =~ s/\.tar\.gz//;
 
 say "Renaming directories";
 rename $pkg_dir => $old_dir;