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
commit13edf3e093fd656d5110b277eca4c9805f3d925c (patch)
tree4dde6db1e4fe99c79021e2b77553ec8e6befa2fe
parent7193adf5d5cbc0a0bd0e49488b4590e3dff19ab2 (diff)
downloadprosody-13edf3e093fd656d5110b277eca4c9805f3d925c.tar.gz
prosody-13edf3e093fd656d5110b277eca4c9805f3d925c.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);