#!/usr/bin/perl -w

use strict;
use warnings;
use Test::Repocop::Common;
use Test::Repocop::TestDB;
use Test::Repocop::CLI::Base;
Test::Repocop::CLI->get_and_process_cli_options();

&Test::Repocop::Common::mkdir_test_environment('');
my $testdb=Test::Repocop::TestDB->new();
$testdb->setup_environment();
my @export_vars=(qw/REPOCOP_TEST_OUTPUTDIR REPOCOP_STATEDIR REPOCOP_TEST_DBDIR/, $testdb->environment_for_export());
foreach my $env (@export_vars) {
    print $env,'=',$ENV{$env},"\n";
}
print 'export ',join(' ',@export_vars),"\n";

__END__

=head1	NAME

repocop-export-environment-for-external-tests - prepares environment for external tests.

=head1	SYNOPSIS

[B<-h|--help>]
[B<-v|--verbose>]
[B<-q|--quiet>]
[B<--workdir> I<workdir>]

=head1	DESCRIPTION

B<repocop-export-environment-for-external-tests>
prepares environment for external tests.

=head1	OPTIONS

=over

=item	B<--workdir> I<dir>

Provides alternative location for the Repocop workdir. Repocop workdir
is a place where test results and packages metadata information are stored.
Default is I<~/.repocop>.

=item	B<-h, --help>

Display this help and exit.

=item	B<-v, --verbose>, B<-q, --quiet>

Verbosity level. Multiple -v increase the verbosity level, -q sets it to 0.


=back

=head1	AUTHOR

Written by Igor Vlasenko <viy@altlinux.org>.

=head1	ACKNOWLEGEMENTS

To Alexey Torbin <at@altlinux.org>, whose qa-robot package
had a strong influence on repocop.

=head1	COPYING

Copyright (c) 2008-2022 Igor Vlasenko, ALT Linux Team.

This is free software; you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.

=cut

