From 1863e55087cca74572536871f48124f088e11111 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 22 Feb 2023 23:31:12 +0000 Subject: ctanbib (23feb23) git-svn-id: svn://tug.org/texlive/trunk@66068 c570f23f-e606-0410-a88d-b1316a301751 --- .../texk/texlive/linked_scripts/ctanbib/ctanbib | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'Build') diff --git a/Build/source/texk/texlive/linked_scripts/ctanbib/ctanbib b/Build/source/texk/texlive/linked_scripts/ctanbib/ctanbib index 70b31badbac..0242c235de4 100755 --- a/Build/source/texk/texlive/linked_scripts/ctanbib/ctanbib +++ b/Build/source/texk/texlive/linked_scripts/ctanbib/ctanbib @@ -34,7 +34,7 @@ if args.help then print(msg) os.exit(0) elseif args.version then - print "ctanbib version 0.2a" + print "ctanbib version 0.2b" os.exit(0) elseif args.ctan then pkgurl = true @@ -76,15 +76,18 @@ version = {$version}, local dom = require('luaxml-domobject') -local load_xml = function(url) +local load_xml = function(url, verification) -- local command = io.popen("wget -qO- ".. url,"r") - local command = io.popen("curl -sS ".. url,"r") + local command = io.popen("curl --ssl-no-revoke -sS ".. url,"r") + local verification = verification or "" + + if not command then return nil, "Cannot open Curl" end local info = command:read("*all") command:close() - if string.len(info) == 0 then - return false + if not info or string.len(info) == 0 or not info:match(verification) then + return nil, "Cannot load XML", info end return dom.parse(info ), info end @@ -102,7 +105,11 @@ end local author_list local fetch_author_list = function() if author_list then return author_list end - local authors = load_xml(authors_url) + local authors, msg = load_xml(authors_url, "