exit 0 if $ENV{AUTOMATED_TESTING};
# begin inc::DownloadShareDirContent (1)
use File::Spec;
use File::Temp 'tempdir';
use HTTP::Tiny;
use Archive::Extract;

my $archive_file = File::Spec->catfile(tempdir(CLEANUP => 1), 'master.zip');
print "downloading https://github.com/ptrofimov/beanstalk_console/archive/master.zip to $archive_file...
";
my $response = HTTP::Tiny->new->mirror('https://github.com/ptrofimov/beanstalk_console/archive/master.zip', $archive_file);
$response->{success} or die "failed to download https://github.com/ptrofimov/beanstalk_console/archive/master.zip into $archive_file";

my $extract_dir = '.';
my $share_dir = 'share';
my $ae = Archive::Extract->new(archive => $archive_file);
$ae->extract(to => $extract_dir) or die "failed to extract $archive_file to $extract_dir";
rename('beanstalk_console-master', $share_dir);

# ensure local data storage file is writable
chmod(0644, File::Spec->catfile($share_dir, 'storage.json'));

# end inc::DownloadShareDirContent (1)
# This Build.PL for Plack-App-BeanstalkConsole was generated by Dist::Zilla::Plugin::ModuleBuildTiny 0.015.
use strict;
use warnings;

# inserted by Dist::Zilla::Plugin::CheckBin 0.007
use Devel::CheckBin;
check_bin('php-cgi');

use 5.006;
use Module::Build::Tiny 0.034;
Build_PL();
