mirror of
https://github.com/moderntld/.o.git
synced 2024-05-11 05:54:56 +00:00
9333929d92
This will automatically check whether or not a new zonefile is valid, and if it contains the appropriate domain records on every commit (and Pull Request!)
18 lines
288 B
Bash
18 lines
288 B
Bash
cd zone
|
|
|
|
for f in *
|
|
do
|
|
while read domain; do
|
|
FIRST=`echo "$domain" | awk '{print $1;}'`
|
|
if [[ $FIRST == *$f ]]; then
|
|
echo $FIRST > /dev/null
|
|
else
|
|
echo $FIRST
|
|
echo "A line in ${f} does not match the domain name!"
|
|
exit 1
|
|
fi
|
|
done <$f
|
|
done
|
|
|
|
exit 0
|