Software /
code /
prosody
Comparison
prosodyctl @ 6587:54306208f30b
prosodyctl: Expand plugin paths and attempt to identify prosody-modules checkouts
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 21 Jan 2015 02:55:27 +0100 |
parent | 6586:317ad7f1c2ba |
child | 6611:65dd3770bcb0 |
comparison
equal
deleted
inserted
replaced
6586:317ad7f1c2ba | 6587:54306208f30b |
---|---|
530 show_usage([[about]], [[Show information about this Prosody installation]]); | 530 show_usage([[about]], [[Show information about this Prosody installation]]); |
531 return 1; | 531 return 1; |
532 end | 532 end |
533 | 533 |
534 local pwd = "."; | 534 local pwd = "."; |
535 local lfs = require "lfs"; | |
535 local array = require "util.array"; | 536 local array = require "util.array"; |
536 local keys = require "util.iterators".keys; | 537 local keys = require "util.iterators".keys; |
538 local hg = require"util.mercurial"; | |
537 local relpath = config.resolve_relative_path; | 539 local relpath = config.resolve_relative_path; |
538 | 540 |
539 print("Prosody "..(prosody.version or "(unknown version)")); | 541 print("Prosody "..(prosody.version or "(unknown version)")); |
540 print(""); | 542 print(""); |
541 print("# Prosody directories"); | 543 print("# Prosody directories"); |
542 print("Data directory: "..relpath(pwd, data_path)); | 544 print("Data directory: "..relpath(pwd, data_path)); |
543 print("Plugin directory: "..relpath(pwd, CFG_PLUGINDIR or ".")); | |
544 print("Config directory: "..relpath(pwd, CFG_CONFIGDIR or ".")); | 545 print("Config directory: "..relpath(pwd, CFG_CONFIGDIR or ".")); |
545 print("Source directory: "..relpath(pwd, CFG_SOURCEDIR or ".")); | 546 print("Source directory: "..relpath(pwd, CFG_SOURCEDIR or ".")); |
547 print("Plugin directories:") | |
548 print(" "..(prosody.paths.plugins:gsub("([^;]+);?", function(path) | |
549 local opath = path; | |
550 path = config.resolve_relative_path(pwd, path); | |
551 local hgid, hgrepo = hg.check_id(path); | |
552 if not hgid and hgrepo then | |
553 return path.." - "..hgrepo .."!\n "; | |
554 end | |
555 hgrepo = hgrepo == "010452cfaf53" and "prosody-modules"; | |
556 return path..(hgid and " - "..(hgrepo or "HG").." rev: "..hgid or "") | |
557 .."\n "; | |
558 end))); | |
546 print(""); | 559 print(""); |
547 print("# Lua environment"); | 560 print("# Lua environment"); |
548 print("Lua version: ", _G._VERSION); | 561 print("Lua version: ", _G._VERSION); |
549 print(""); | 562 print(""); |
550 print("Lua module search paths:"); | 563 print("Lua module search paths:"); |