]> git.madduck.net Git - code/gsc.git/blob - examples/nsd/zones.conf-generator

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Initial checkin
[code/gsc.git] / examples / nsd / zones.conf-generator
1 #!/bin/sh
2 #
3 # zones.conf-generator — generate zones.conf through interpolation
4 #
5 # Copyright © 2014 martin f. krafft <madduck@madduck.net>
6 # Released under the terms of the Artistic Licence 2.0
7 #
8 set -eu
9
10 for zonefile in zones/*.zone arpazones/*.arpa; do
11   zone=${zonefile%.zone}; zone=${zone##*/};
12   printf 'zone:\n\tname: "%s"\n\tzonefile: "%s"\n' $zone $zonefile;
13 done
14
15 cat <<_eof
16
17 ## checksums:
18 _eof
19 find arpazones zones -type f -exec sha256sum {} + | sed -e 's,^,#,'