From be10fa318f9c1b04994ed86c83aabb5d8f488ecd Mon Sep 17 00:00:00 2001 From: Christoffer Date: Fri, 14 Dec 2018 18:52:53 +0000 Subject: [PATCH] Update roagen.php to include latest `git show` Include output of `git show` as comments at the top of output files --- roagen.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roagen.php b/roagen.php index 5dd1b6d..9ff53c5 100755 --- a/roagen.php +++ b/roagen.php @@ -239,6 +239,7 @@ $json = json_encode ($roas, JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT); // Write JSON to file $fp = fopen ('roa/export_dn42.json', 'w'); +fwrite ($fp, shell_exec ("/usr/bin/git -C ../registry/ show | sed 's/^/\/\/ /g'")); fwrite ($fp, $json); fclose ($fp); @@ -247,6 +248,10 @@ $fq = fopen ('roa/bird_roa_dn42.conf', 'w'); $fq4 = fopen ('roa/bird4_roa_dn42.conf', 'w'); $fq6 = fopen ('roa/bird6_roa_dn42.conf', 'w'); +fwrite ($fq, shell_exec ("/usr/bin/git -C ../registry/ show | sed 's/^/# /g'")); +fwrite ($fq4, shell_exec ("/usr/bin/git -C ../registry/ show | sed 's/^/# /g'")); +fwrite ($fq6, shell_exec ("/usr/bin/git -C ../registry/ show | sed 's/^/# /g'")); + foreach ($roas["roas"] as $roa) { $prfx = $roa["prefix"];