summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2017-01-29 20:50:18 +0100
committerPhilipp Gesang <phg@phi-gamma.net>2017-01-29 20:52:03 +0100
commit616b9077567fd670341696cb6ff2bfc71cf691a9 (patch)
treea01850c3a3562d496bda1675c4f7da6453524597 /scripts
parent31831b966ec0bef1bd1068fc8eb5db80dfae2ea2 (diff)
downloadluaotfload-2.8.tar.gz
[mkglyphlist] adjust for erratic Adobev2.8
They just had to remove the AGL download and change the format on their GH repo … Long-term we might add their repo as a submodule.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mkglyphlist21
1 files changed, 7 insertions, 14 deletions
diff --git a/scripts/mkglyphlist b/scripts/mkglyphlist
index f66a686..b9d5309 100755
--- a/scripts/mkglyphlist
+++ b/scripts/mkglyphlist
@@ -18,7 +18,7 @@
-----------------------------------------------------------------------
local glyphfile = "./build/glyphlist.txt"
local font_age = "./build/luaotfload-glyphlist.lua"
-local glyph_source = "http://partners.adobe.com/public/developer/en/opentype/glyphlist.txt"
+local glyph_source = "https://raw.githubusercontent.com/adobe-type-tools/agl-aglfn/master/glyphlist.txt"
-----------------------------------------------------------------------
-- fallbacks
@@ -67,7 +67,7 @@ local eol = P"\n\r" + P"\r\n" + P"\r" + P"\n"
local space = P" "
local alphanum = R("az", "AZ", "09")
local hexdigit = R("af", "AF", "09")
-local eof_tag = gartenzaun * P"--end"
+local eof_tag = gartenzaun * P"END"
local header_line = gartenzaun * (1-eol)^0 * eol
local codepoint = hexdigit^1
local glyphname = alphanum^1
@@ -140,19 +140,12 @@ local get_raw get_raw = function (retry)
elseif not retry then --- attempt download
print"info: retrieving glyph list from"
print(glyph_source)
- local glyphdata = http.request(glyph_source)
- if glyphdata then
- local fh = io.open(glyphfile, "wb")
- if not fh then
- print (string.format ("error: glyph file (%s) not writable", glyphfile))
- os.exit(-1)
- end
- fh:write(glyphdata)
- fh:close()
- return get_raw(true)
+ local cmd = string.format("wget '%s' -o '%s'", glyph_source, glyphfile)
+ local st = os.execute(string.format("wget '%s' -O '%s'", glyph_source, glyphfile))
+ if st ~= 0 then
+ print(string.format("error: download failed; status: %d, command: %q", st, cmd))
+ os.exit(-1)
end
- print"error: download failed"
- os.exit(-1)
end
print("error: could not obtain glyph data from "..glyphfile)
os.exit(-1)