diff options
-rw-r--r-- | Makefile | 11 | ||||
-rw-r--r-- | files/mirrors/.gitignore | 2 | ||||
-rw-r--r-- | files/mirrors/Makefile | 25 | ||||
-rw-r--r-- | files/mirrors/distfiles.xml | 3 | ||||
-rw-r--r-- | files/mirrors/rsync.xml | 1 |
5 files changed, 39 insertions, 3 deletions
@@ -1,3 +1,10 @@ .PHONY: check -check: - $(MAKE) -C files/overlays $@ +check: check-overlays check-mirrors + +.PHONY: check-overlays +check-overlays: + $(MAKE) -C files/overlays check + +.PHONY: check-mirrors +check-mirrors: + $(MAKE) -C files/mirrors check diff --git a/files/mirrors/.gitignore b/files/mirrors/.gitignore new file mode 100644 index 0000000..df8ee85 --- /dev/null +++ b/files/mirrors/.gitignore @@ -0,0 +1,2 @@ +*.expected-format.xml +*.expected-format.xml.ok diff --git a/files/mirrors/Makefile b/files/mirrors/Makefile new file mode 100644 index 0000000..3aebd33 --- /dev/null +++ b/files/mirrors/Makefile @@ -0,0 +1,25 @@ +.%.expected-format.xml: %.xml + xmlstarlet fo --encode utf-8 $^ > $@ + +.ONESHELL: +.%.expected-format.xml.ok: SHELL = /bin/bash +.%.expected-format.xml.ok: .%.expected-format.xml + if ! cmp -s $*.xml $^; then + diff -u $*.xml $^ + exit 1 + fi + touch $@ + +.PHONY: check +check: .distfiles.expected-format.xml.ok .rsync.expected-format.xml.ok + +.PHONY: format +.ONESHELL: +format: SHELL = /bin/bash +format:.distfiles.expected-format.xml .rsync.expected-format.xml + for FILE in distfiles rsync; do + if cmp -s "$${FILE}.xml" ".$${FILE}.expected-format.xml"; then + continue + fi + cp ".$${FILE}.expected-format.xml" "$${FILE}.xml" + done diff --git a/files/mirrors/distfiles.xml b/files/mirrors/distfiles.xml index 9d71165..1e6c755 100644 --- a/files/mirrors/distfiles.xml +++ b/files/mirrors/distfiles.xml @@ -1,3 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> <!-- vim: ft=xml et ts=2 sts=2 sw=2: --> @@ -348,7 +349,7 @@ vim: ft=xml et ts=2 sts=2 sw=2: </mirror> <mirror> <name>Get Hosted online</name> - <uri protocol="ftp" ipv4="y" ipv6="n" partial="n">ftp://mirrors.gethosted.online/gentoo</uri> + <uri protocol="ftp" ipv4="y" ipv6="n" partial="n">ftp://mirrors.gethosted.online/gentoo</uri> <uri protocol="http" ipv4="y" ipv6="n" partial="n">https://mirrors.gethosted.online/gentoo</uri> <uri protocol="http" ipv4="y" ipv6="n" partial="n">http://mirrors.gethosted.online/gentoo</uri> </mirror> diff --git a/files/mirrors/rsync.xml b/files/mirrors/rsync.xml index f6b0039..b285825 100644 --- a/files/mirrors/rsync.xml +++ b/files/mirrors/rsync.xml @@ -1,3 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> <!-- vim: ft=xml et ts=2 sts=2 sw=2: --> |