Comparison

prosodyctl @ 6584:c3a56f8847ac

prosodyctl: Show relative paths in about
author Kim Alvefur <zash@zash.se>
date Fri, 04 Jul 2014 23:13:51 +0200
parent 6501:71b6e8b48a12
child 6586:317ad7f1c2ba
comparison
equal deleted inserted replaced
6583:93bab6958683 6584:c3a56f8847ac
526 if arg[1] == "--help" then 526 if arg[1] == "--help" then
527 show_usage([[about]], [[Show information about this Prosody installation]]); 527 show_usage([[about]], [[Show information about this Prosody installation]]);
528 return 1; 528 return 1;
529 end 529 end
530 530
531 local pwd = ".";
531 local array = require "util.array"; 532 local array = require "util.array";
532 local keys = require "util.iterators".keys; 533 local keys = require "util.iterators".keys;
534 local relpath = config.resolve_relative_path;
533 535
534 print("Prosody "..(prosody.version or "(unknown version)")); 536 print("Prosody "..(prosody.version or "(unknown version)"));
535 print(""); 537 print("");
536 print("# Prosody directories"); 538 print("# Prosody directories");
537 print("Data directory: ", CFG_DATADIR or "./"); 539 print("Data directory: "..relpath(pwd, data_path));
538 print("Plugin directory:", CFG_PLUGINDIR or "./"); 540 print("Plugin directory: "..relpath(pwd, CFG_PLUGINDIR or "."));
539 print("Config directory:", CFG_CONFIGDIR or "./"); 541 print("Config directory: "..relpath(pwd, CFG_CONFIGDIR or "."));
540 print("Source directory:", CFG_SOURCEDIR or "./"); 542 print("Source directory: "..relpath(pwd, CFG_SOURCEDIR or "."));
541 print(""); 543 print("");
542 print("# Lua environment"); 544 print("# Lua environment");
543 print("Lua version: ", _G._VERSION); 545 print("Lua version: ", _G._VERSION);
544 print(""); 546 print("");
545 print("Lua module search paths:"); 547 print("Lua module search paths:");