]> Sergey Matveev's repositories - public-inbox.git/commitdiff
certs/create-certs: create certs in 'certs/' directory
authorEric Wong <e@80x24.org>
Mon, 24 Jun 2019 08:16:43 +0000 (08:16 +0000)
committerEric Wong <e@80x24.org>
Wed, 26 Jun 2019 08:05:53 +0000 (08:05 +0000)
If running in our top-level source tree, use the 'certs/'
directory as  the prefix so we can just invoke `./certs/create-certs.perl'
instead of `(cd certs && ./create-certs.perl)'

certs/create-certs.perl

index 476be4d7f90dc2df09593deef6dd88a124301aa5..b287cec5842626fc7b32304413c14cb8596bffd7 100755 (executable)
@@ -6,7 +6,7 @@ use warnings;
 use IO::Socket::SSL::Utils;
 use Net::SSLeay;
 
-my $dir = "./";
+my $dir = -d 'certs' && -f 'Makefile.PL' ? './certs/' : './';
 my $now = time();
 my $later = 0x7fffffff; # 2038 problems on 32-bit :<