View Single Post
Old 05-30-2017, 12:01 PM   #1052
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by emcintosh View Post
In kpdf.sh (which happens to be located in /mnt/us/kindlepdfviewer/):
Line 08: cd /mnt/us/kindlepdfviewer/
Line 25: ./reader.lua "$1" 2> crash.log

Alternative line 25 I had tried: /mnt/us/kindlepdfviewer/reader.lua "$1" 2> crash.log

- - - - -
And the first line of reader.lua:
Code:
#!./koreader-base
Ref: https://github.com/koreader/kindlepd...ter/reader.lua

And the first line of koreader-base:
Code:
#!./luajit
Ref: https://github.com/koreader/koreader.../koreader-base

Which ends with:
Code:
if not arg[1] then
	error("you must give the name of the main lua executable as the first argument")
end
local file = arg[1]
table.remove(arg, 1)

ARGV=arg

dofile(file)
Note that the error test only tests for the presence of an argument, not if it makes any sense in the context that the script is called.

So, what are you passing as arg[1]?
Does it include a full path to the file?
knc1 is offline   Reply With Quote