diff options
author | Philipp Gesang <phg42.2a@gmail.com> | 2014-03-23 14:48:54 +0100 |
---|---|---|
committer | Philipp Gesang <phg42.2a@gmail.com> | 2014-03-23 14:48:54 +0100 |
commit | c28953f53ada2a3ba5eb0891d0bb59d28d2cef51 (patch) | |
tree | 22e4253ca4d99982d836af96f35ae44c9216c319 /src/luaotfload-tool.lua | |
parent | a026ac6112b4a22aedc9c20a867da02afb734f56 (diff) | |
download | luaotfload-c28953f53ada2a3ba5eb0891d0bb59d28d2cef51.tar.gz |
[tool] add stop directive to bisect mode
Diffstat (limited to 'src/luaotfload-tool.lua')
-rwxr-xr-x | src/luaotfload-tool.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/luaotfload-tool.lua b/src/luaotfload-tool.lua index 5c7cb1d..4c915cf 100755 --- a/src/luaotfload-tool.lua +++ b/src/luaotfload-tool.lua @@ -115,6 +115,7 @@ config.lualibs.load_extended = true require "lualibs" local iosavedata = io.savedata +local lfsisdir = lfs.isdir local lfsisfile = lfs.isfile local stringsplit = string.split local tableserialize = table.serialize @@ -834,6 +835,27 @@ end --doc]]-- local bisect_stop = function () + report ("info", 3, "bisect", "Erasing bisection state at %s.", bisect_status_file) + if lfsisfile (bisect_status_file) then + local success, msg = os.remove (bisect_status_file) + if not success then + report ("info", 2, "bisect", + "Failed to erase file %s (%s).", + bisect_status_file, msg) + end + end + if lfsisdir (bisect_status_path) then + local success, msg = os.remove (bisect_status_path) + if not success then + report ("info", 2, "bisect", + "Failed to erase directory %s (%s).", + bisect_status_path, msg) + end + end + if lfsisfile (bisect_status_file) then + return false + end + return true end --[[doc-- |