summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-07-19 14:38:20 +0200
committerPhilipp Gesang <phg42.2a@gmail.com>2013-07-19 14:38:20 +0200
commitf4839beb7200eaa46fabdcb1a9000d4844520844 (patch)
tree47c8f486c8d785f12eefd8cf41d16bc4a3cc34c1
parentbc9469bd5d51458cde6d2d6b3c46f3593dc04ea0 (diff)
downloadluaotfload-f4839beb7200eaa46fabdcb1a9000d4844520844.tar.gz
add revision info to output of --version in luaotfload-tool
-rwxr-xr-xluaotfload-tool.lua25
1 files changed, 13 insertions, 12 deletions
diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua
index f7558e8..ea6b525 100755
--- a/luaotfload-tool.lua
+++ b/luaotfload-tool.lua
@@ -161,8 +161,12 @@ require"luaotfload-override.lua" --- this populates the logs.* namespace
require"luaotfload-database"
require"alt_getopt"
-local version = "2.3" -- same version number as luaotfload
-local names = fonts.names
+local names = fonts.names
+
+local status_file = "luaotfload-status"
+local status = require (status_file)
+
+local version = "2.3"
local sanitize_string = names.sanitize_string
@@ -281,10 +285,12 @@ end
local version_msg = function ( )
texiowrite_nl(stringformat(
"%s version %q\n" .. -- no \z due to 5.1 compatibility
+ "revision %q\n" ..
"database version %q\n" ..
"Lua interpreter: %s; version %q\n",
config.luaotfload.self,
version,
+ status.notes.revision,
names.version,
runtime[1],
runtime[2]))
@@ -953,10 +959,10 @@ do
logs.names_report (false, 0, "diagnose", ...)
end
- local verify_files = function (errcnt, info)
+ local verify_files = function (errcnt, status)
out "================ verify files ================="
- local hashes = info.hashes
- local notes = info.notes
+ local hashes = status.hashes
+ local notes = status.notes
if not hashes or #hashes == 0 then
out ("FAILED: cannot read checksums from %s.", status_file)
return 1/0
@@ -1329,7 +1335,6 @@ do
--- github api stuff end
local anamneses = { "files", "repository", "permissions" }
- local status_file = "luaotfload-status"
actions.diagnose = function (job)
local errcnt = 0
@@ -1341,11 +1346,8 @@ do
asked = tabletohash (asked, true)
end
- out "Loading file hashes."
- local info = require (status_file)
-
if asked.files == true then
- errcnt = verify_files (errcnt, info)
+ errcnt = verify_files (errcnt, status)
asked.files = nil
end
if asked.permissions == true then
@@ -1353,8 +1355,7 @@ do
asked.permissions = nil
end
if asked.repository == true then
- --errcnt = check_upstream (info.notes.revision)
- check_upstream (info.notes.revision)
+ check_upstream (status.notes.revision)
asked.repository = nil
end