mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
[Kindle NT] fix terminal and timesync (#12765)
Closes #12760 Credits go to @benoit-pierre (Thank you!)
This commit is contained in:
@@ -1635,4 +1635,14 @@ function util.round_decimal(num, points)
|
||||
return math.floor(num * op) / op
|
||||
end
|
||||
|
||||
function util.which(command, path)
|
||||
path = path or os.getenv("PATH") or ""
|
||||
for p in path:gmatch("([^:]+)") do
|
||||
p = p .. "/" .. command
|
||||
if ffiUtil.isExecutable(p) then
|
||||
return p
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return util
|
||||
|
||||
Reference in New Issue
Block a user