Comparison

prosodyctl @ 3742:a18acd47904b

prosodyctl: Added and updated some comments and some semicolons, to match main prosody executable.
author Waqas Hussain <waqas20@gmail.com>
date Sun, 12 Dec 2010 17:18:16 +0500
parent 3741:f7dd583d99b4
child 3773:2e15808243f3
comparison
equal deleted inserted replaced
3741:f7dd583d99b4 3742:a18acd47904b
1 #!/usr/bin/env lua 1 #!/usr/bin/env lua
2 -- Prosody IM 2 -- Prosody IM
3 -- Copyright (C) 2008-2009 Matthew Wild 3 -- Copyright (C) 2008-2010 Matthew Wild
4 -- Copyright (C) 2008-2009 Waqas Hussain 4 -- Copyright (C) 2008-2010 Waqas Hussain
5 -- 5 --
6 -- This project is MIT/X11 licensed. Please see the 6 -- This project is MIT/X11 licensed. Please see the
7 -- COPYING file in the source package for more information. 7 -- COPYING file in the source package for more information.
8 -- 8 --
9 9
14 CFG_SOURCEDIR=os.getenv("PROSODY_SRCDIR"); 14 CFG_SOURCEDIR=os.getenv("PROSODY_SRCDIR");
15 CFG_CONFIGDIR=os.getenv("PROSODY_CFGDIR"); 15 CFG_CONFIGDIR=os.getenv("PROSODY_CFGDIR");
16 CFG_PLUGINDIR=os.getenv("PROSODY_PLUGINDIR"); 16 CFG_PLUGINDIR=os.getenv("PROSODY_PLUGINDIR");
17 CFG_DATADIR=os.getenv("PROSODY_DATADIR"); 17 CFG_DATADIR=os.getenv("PROSODY_DATADIR");
18 18
19 -- -- -- -- -- -- -- ---- -- -- -- -- -- -- -- -- 19 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20 20
21 -- Tell Lua where to find our libraries
21 if CFG_SOURCEDIR then 22 if CFG_SOURCEDIR then
22 package.path = CFG_SOURCEDIR.."/?.lua;"..package.path 23 package.path = CFG_SOURCEDIR.."/?.lua;"..package.path;
23 package.cpath = CFG_SOURCEDIR.."/?.so;"..package.cpath 24 package.cpath = CFG_SOURCEDIR.."/?.so;"..package.cpath;
24 end 25 end
25 26
27 -- Substitute ~ with path to home directory in data path
26 if CFG_DATADIR then 28 if CFG_DATADIR then
27 if os.getenv("HOME") then 29 if os.getenv("HOME") then
28 CFG_DATADIR = CFG_DATADIR:gsub("^~", os.getenv("HOME")); 30 CFG_DATADIR = CFG_DATADIR:gsub("^~", os.getenv("HOME"));
29 end 31 end
30 end 32 end