mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-01-12 02:17:43 +08:00
54de1ff698
* govendor gopkg.in/yaml.v2 * Ignore YAML and BIND test data litter. Create README.txt files to force git to create subdirectories. * Update convertzone to also read OctoDNS files
17 lines
406 B
Bash
Executable file
17 lines
406 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Read the YAML files in the config directory and generate a production.yaml file.
|
|
|
|
cat <<HERE >production.yaml
|
|
---
|
|
providers:
|
|
config:
|
|
class: octodns.provider.yaml.YamlProvider
|
|
directory: ./config
|
|
zones:
|
|
HERE
|
|
|
|
( cd config && ls *.yaml ) |
|
|
grep -v '^provider.yaml$' |
|
|
sed 's/.\{4\}$//' |
|
|
awk '{ print " " $1 ":" ; print " sources:" ; print " - config" }' >>production.yaml
|