diff options
author | 2016-11-07 16:12:06 +0100 | |
---|---|---|
committer | 2016-11-07 16:12:06 +0100 | |
commit | cf4a8b9e0342e42f5c4e4f38e66b3cd96dd3fcc5 (patch) | |
tree | 1b5db9ba22e47ed67e0bf7f0534334af68d0b613 /3rdparty/lsqlite3/extras/installpath.lua | |
parent | a60731323599ab4d624adba7a73333037670430d (diff) |
resurected sqlite3 and lsqlite3 (nw)
Diffstat (limited to '3rdparty/lsqlite3/extras/installpath.lua')
-rw-r--r-- | 3rdparty/lsqlite3/extras/installpath.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/3rdparty/lsqlite3/extras/installpath.lua b/3rdparty/lsqlite3/extras/installpath.lua new file mode 100644 index 00000000000..043184afccc --- /dev/null +++ b/3rdparty/lsqlite3/extras/installpath.lua @@ -0,0 +1,14 @@ +-- Script to find the install path for a C module. Public domain. + +if not arg or not arg[1] then + io.write("Usage: lua installpath.lua modulename\n") + os.exit(1) +end +for p in string.gfind(package.cpath, "[^;]+") do + if string.sub(p, 1, 1) ~= "." then + local p2 = string.gsub(arg[1], "%.", string.sub(package.config, 1, 1)) + io.write(string.gsub(p, "%?", p2), "\n") + return + end +end +error("no suitable installation path found") |