dn42-roagen/update.sh
netravnen 5025e2b2f4 roagen: update compability for ROA files for Bird 2.x, too.
- Update the following files:
  - lib/functions.php
  - roa/README.md
  - update.sh
- New ROA files being generated for Bird 2.x
  - roa/bird_route_dn42.conf
  - roa/bird4_route_dn42.conf
  - roa/bird6_route_dn42.conf
2019-01-04 09:34:25 +00:00

39 lines
944 B
Bash
Executable file

#!/bin/bash
ISO_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
# Ensure registry repository is up-to-date
git -C ../registry/ pull upstream master:master --quiet 2>&1
# Checkout master branch in dn42/repository
git -C ../registry/ checkout master --quiet
# Update with data from registry
php roagen.php
php rfc8416.php
# Write out last commit to file
echo "## Notes
- These files are Bird 1.x compatible:
- bird_roa_dn42.conf
- bird4_roa_dn42.conf
- bird6_roa_dn42.conf
- These files are Bird 2.x compatible:
- bird_route_dn42.conf
- bird4_route_dn42.conf
- bird6_route_dn42.conf
## Last commit
\`\`\`
$(git -C ../registry/ log -n 1)
\`\`\`" > roa/README.md
# Commit latest version of ROA files
git add roa/*
git commit roa/* -m "Updated ROA files - $ISO_DATE" --quiet
# Push repository to every remote configured
for REMOTE in $(git remote | egrep -v upstream | paste -sd " " -) ; do git push $REMOTE master:master --quiet ; done