Comparison

prosodyctl @ 8104:4e5a8365c53f

prosodyctl: Fix indentation
author Kim Alvefur <zash@zash.se>
date Fri, 21 Apr 2017 13:21:47 +0200
parent 8102:927b9c5cc17a
child 8105:851b50401a26
comparison
equal deleted inserted replaced
8102:927b9c5cc17a 8104:4e5a8365c53f
18 18
19 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 19 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20 20
21 local function is_relative(path) 21 local function is_relative(path)
22 local path_sep = package.config:sub(1,1); 22 local path_sep = package.config:sub(1,1);
23 return ((path_sep == "/" and path:sub(1,1) ~= "/") 23 return ((path_sep == "/" and path:sub(1,1) ~= "/")
24 or (path_sep == "\\" and (path:sub(1,1) ~= "/" and path:sub(2,3) ~= ":\\"))) 24 or (path_sep == "\\" and (path:sub(1,1) ~= "/" and path:sub(2,3) ~= ":\\")))
25 end 25 end
26 26
27 -- Tell Lua where to find our libraries 27 -- Tell Lua where to find our libraries
28 if CFG_SOURCEDIR then 28 if CFG_SOURCEDIR then
29 local function filter_relative_paths(path) 29 local function filter_relative_paths(path)
248 248
249 local prosodyctl = require "util.prosodyctl" 249 local prosodyctl = require "util.prosodyctl"
250 local socket = require "socket" 250 local socket = require "socket"
251 ----------------------- 251 -----------------------
252 252
253 -- FIXME: Duplicate code waiting for util.startup 253 -- FIXME: Duplicate code waiting for util.startup
254 function read_version() 254 function read_version()
255 -- Try to determine version 255 -- Try to determine version
256 local version_file = io.open((CFG_SOURCEDIR or ".").."/prosody.version"); 256 local version_file = io.open((CFG_SOURCEDIR or ".").."/prosody.version");
257 prosody.version = "unknown"; 257 prosody.version = "unknown";
258 if version_file then 258 if version_file then