#!/usr/bin/perl use Modern::Perl; my $pkgname = $ARGV[0] or die; my $s = `svn update; svn info`; my ($revision) = $s =~ m/^Revision: (\d+)$/m; my ($url) = $s =~ m/^URL: (.+)$/m; my $dir = "$pkgname-$revision"; chdir "$ENV{HOME}/tmp" or die; system("rm", "-rf", $dir); system("svn", "export", "-r", $revision, $url, $dir); system("tar", "cvfz", "$dir.tar.gz", $dir); say "$dir.tar.gz";