From b66dcdd5b8f270c8fe415fd9d1c9ded177bd7264 Mon Sep 17 00:00:00 2001 From: Michael Howe Date: Mon, 25 Dec 2023 17:20:26 +0000 Subject: [PATCH] build-package: support for specific output dir This helps with multiple builds --- bin/build-package | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bin/build-package b/bin/build-package index 5c8b9c3..e6a7ffc 100755 --- a/bin/build-package +++ b/bin/build-package @@ -31,6 +31,7 @@ my @dists; # = 'squeeze'; my $dsc; # optional; allows use of a dsc directly my $os = 'debian'; my $binary_only; +my $local_outputdir; GetOptions( "arch=s" => \@archs, @@ -38,6 +39,7 @@ GetOptions( "os=s" => \$os, "dsc=s" => \$dsc, 'binary-only' => \$binary_only, + "output-dir=s" => \$local_outputdir, ); my $path = $ARGV[0]; @@ -151,7 +153,13 @@ print "Running @cowpokecmd"; system( @cowpokecmd ) == 0 or die "Could not run cowpoke: $!"; -my $local_outputdir = tempdir( DIR => $workingdir ); +if( $local_outputdir ){ + if( ! -d $local_outputdir ){ + mkdir "$local_outputdir" or die "Could not mkdir $local_outputdir: $!" + } +} else { + $local_outputdir = tempdir( DIR => $workingdir ); +} my @rsynccmd = ( $rsync, "-az", "$buildhost:$remote_outputdir/", "$local_outputdir/" ); print "Running @rsynccmd\n"; -- 2.39.5