diff options
author | Philipp Gesang <phg@phi-gamma.net> | 2017-01-29 21:01:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-29 21:01:24 +0100 |
commit | c6a32f887d4084f0c3bde51fda4a737b51d1eb06 (patch) | |
tree | a01850c3a3562d496bda1675c4f7da6453524597 /scripts/mkglyphlist | |
parent | 98656f9d5ca25aaea2e977b79e09c9bb661f4cef (diff) | |
parent | 616b9077567fd670341696cb6ff2bfc71cf691a9 (diff) | |
download | luaotfload-c6a32f887d4084f0c3bde51fda4a737b51d1eb06.tar.gz |
Merge pull request #395 from phi-gamma/master
v2.8
Diffstat (limited to 'scripts/mkglyphlist')
-rwxr-xr-x | scripts/mkglyphlist | 21 |
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) |