}
my $srcdir = File::Spec->catdir( $context->{release_tree}, 'src', 'src' );
- chdir $srcdir or die "chdir $srcdir: $\n";
+ chdir $srcdir or die "chdir $srcdir: $!\n";
if ( -f "version.sh" ) {
print( "WARNING: version.sh already exists - leaving it in place\n" );
my @cmd = (
$genpath, '--spec', $spec, '--filter',
$filter, '--latest', $context->{trelease}, '--tmpl',
- $templates, '--docroot', $dir, '--localstatic',
- (($verbose||$debug) ? '--verbose' : '')
+ $templates, '--docroot', $dir, '--localstatic'
);
+ push @cmd, '--verbose' if $verbose or $debug;
print "Executing ", join( ' ', @cmd ), "\n";
system(@cmd);
my $context = shift;
print "Cleaning up\n" if ($verbose);
+ chdir( $context->{directory} ) || die;
rmtree( $context->{release_tree}, { verbose => $debug } );
rmtree( $context->{docbook}, { verbose => $debug } );
rmtree( $context->{pkgdirs}, { verbose => $debug } );