summaryrefslogtreecommitdiffstats
path: root/ansible_collections/community/dns/update-psl.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ansible_collections/community/dns/update-psl.sh')
-rwxr-xr-xansible_collections/community/dns/update-psl.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/ansible_collections/community/dns/update-psl.sh b/ansible_collections/community/dns/update-psl.sh
new file mode 100755
index 000000000..a9c23ccb5
--- /dev/null
+++ b/ansible_collections/community/dns/update-psl.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+set +eux
+
+# Sometimes the version on publicsuffix.org differs depending on from where you request it over many hours,
+# so for now let's directly fetch it from GitHub.
+
+# curl https://publicsuffix.org/list/public_suffix_list.dat --output plugins/public_suffix_list.dat
+curl https://raw.githubusercontent.com/publicsuffix/list/master/public_suffix_list.dat --output plugins/public_suffix_list.dat
+
+git status plugins/public_suffix_list.dat
+
+if [ -n "$(git status --porcelain=v1 plugins/public_suffix_list.dat)" ]; then
+ git diff
+ if [ ! -e changelogs/fragments/update-psl.yml ]; then
+ echo "bugfixes:" > changelogs/fragments/update-psl.yml
+ echo ' - "Update Public Suffix List."' >> changelogs/fragments/update-psl.yml
+ fi
+ exit 1
+fi