diff options
author | Daniel Silverstone <daniel.silverstone@codethink.co.uk> | 2014-03-12 14:31:25 +0000 |
---|---|---|
committer | Daniel Silverstone <daniel.silverstone@codethink.co.uk> | 2014-03-12 14:31:25 +0000 |
commit | 77266b3ec2efec51f0a3246cbad70a4f15835958 (patch) | |
tree | 141ed6836821bd96cdb6248735367d0883e2ce1d /utils | |
parent | 0434ed0c1f14bb856e11925dbf45605f10734449 (diff) | |
parent | 98d9af920fb8052b47fdf7cbf2affa5617b6f089 (diff) | |
download | gitano-77266b3ec2efec51f0a3246cbad70a4f15835958.tar.gz |
Merge in rsync support from upstream.
Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
Diffstat (limited to 'utils')
-rw-r--r-- | utils/install-lua-bin | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/utils/install-lua-bin b/utils/install-lua-bin index 4d7322c..3353a34 100644 --- a/utils/install-lua-bin +++ b/utils/install-lua-bin @@ -1,6 +1,6 @@ -- Run this explicitly through -*- Lua -*- -local lua_bin, inst_share_path, inst_bin_path, inst_mod_path, input_name, output_name = ... +local lua_bin, inst_share_path, inst_bin_path, inst_mod_path, inst_plugin_path, input_name, output_name = ... local input_fh = assert(io.open(input_name, "r")) local output_fh = assert(io.open(output_name, "w")) @@ -20,6 +20,16 @@ for path_elem in package.path:gmatch("([^;]+)") do end end +do + -- transform the plugin path from colon separated to a table + -- for interpolation + local path = {} + for entry in string.gfind(inst_plugin_path, "([^:]+)") do + path[#path+1] = ("%q"):format(entry) + end + inst_plugin_path = ("{%s}"):format(table.concat(path, ", ")) +end + while line do local token = line:match("^%-%- @@(.+)$") if token then @@ -38,6 +48,8 @@ while line do output_fh:write(("gitano.config.lib_bin_path(%q)\n"):format(inst_bin_path)) elseif token == "GITANO_SHARE_PATH" then output_fh:write(("gitano.config.share_path(%q)\n"):format(inst_share_path)) + elseif token == "GITANO_PLUGIN_PATH" then + output_fh:write(("gitano.plugins.load_plugins %s\n"):format(inst_plugin_path)) else output_fh:write("-- Unknown token: " .. token .. "\n") end |