Skip to content

Instantly share code, notes, and snippets.

@tippexs
Created February 9, 2021 19:40
Show Gist options
  • Save tippexs/dab19a38b508a91a011f42d138b795fb to your computer and use it in GitHub Desktop.
Save tippexs/dab19a38b508a91a011f42d138b795fb to your computer and use it in GitHub Desktop.
sub copy_file($) {
my ($name) = @_;
my $srcdir;
if (defined $ENV{TEST_NGINX_SRC}) {
$srcdir = $ENV{TEST_NGINX_SRC};
} else {
$srcdir = ".";
}
use File::Copy;
copy("$srcdir/$name", "$t->{_testdir}")
or die "Can't copy source file: $!";
}
copy_file('server.js');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment