aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-01-21 02:55:27 +0100
committerKim Alvefur <zash@zash.se>2015-01-21 02:55:27 +0100
commit45e1b4d1da5e5c9825e23368d8de92c4c5c390de (patch)
tree4dde6db1e4fe99c79021e2b77553ec8e6befa2fe
parent48869f981a9465b0988f9a07c6bb67d75a614837 (diff)
downloadprosody-45e1b4d1da5e5c9825e23368d8de92c4c5c390de.tar.gz
prosody-45e1b4d1da5e5c9825e23368d8de92c4c5c390de.zip
prosodyctl: Expand plugin paths and attempt to identify prosody-modules checkouts
-rwxr-xr-xprosodyctl15
1 files changed, 14 insertions, 1 deletions
diff --git a/prosodyctl b/prosodyctl
index c7daceac..abf9bf95 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -532,17 +532,30 @@ function commands.about(arg)
end
local pwd = ".";
+ local lfs = require "lfs";
local array = require "util.array";
local keys = require "util.iterators".keys;
+ local hg = require"util.mercurial";
local relpath = config.resolve_relative_path;
print("Prosody "..(prosody.version or "(unknown version)"));
print("");
print("# Prosody directories");
print("Data directory: "..relpath(pwd, data_path));
- print("Plugin directory: "..relpath(pwd, CFG_PLUGINDIR or "."));
print("Config directory: "..relpath(pwd, CFG_CONFIGDIR or "."));
print("Source directory: "..relpath(pwd, CFG_SOURCEDIR or "."));
+ print("Plugin directories:")
+ print(" "..(prosody.paths.plugins:gsub("([^;]+);?", function(path)
+ local opath = path;
+ path = config.resolve_relative_path(pwd, path);
+ local hgid, hgrepo = hg.check_id(path);
+ if not hgid and hgrepo then
+ return path.." - "..hgrepo .."!\n ";
+ end
+ hgrepo = hgrepo == "010452cfaf53" and "prosody-modules";
+ return path..(hgid and " - "..(hgrepo or "HG").." rev: "..hgid or "")
+ .."\n ";
+ end)));
print("");
print("# Lua environment");
print("Lua version: ", _G._VERSION);