aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xprosodyctl28
1 files changed, 14 insertions, 14 deletions
diff --git a/prosodyctl b/prosodyctl
index af1fea54..dea588a2 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -88,7 +88,7 @@ local command = table.remove(arg, 1);
function commands.get_modules(arg)
if arg[1] == "--help" then
show_usage([[get_modules]], [[Downloads all available modules]]);
- return 1
+ return 1;
end
if os.execute '[ -e "./downloaded_modules" ]' then
print("The modules have already been imported")
@@ -100,16 +100,16 @@ function commands.get_modules(arg)
print("Downloading plugins")
os.execute("hg clone https://hg.prosody.im/prosody-modules/ downloaded_modules")
print("Done!")
- return 0
+ return 0;
else
print("We keep what we have then!")
- return 0
+ return 0;
end
else
print("Getting all the available modules")
os.execute("hg clone https://hg.prosody.im/prosody-modules/ downloaded_modules")
print("Done!")
- return 0
+ return 0;
end
end
@@ -119,14 +119,14 @@ end
function commands.write_rockspec(arg)
if arg[1] == "--help" then
show_usage([[write_rockspec]], [[Picks up a module and writes an initial rockspec]]);
- return 1
+ return 1;
end
print("Writing rockspec for "..arg[1])
os.execute("luarocks write_rockspec "..arg[1].." ./downloaded_modules/"..arg[1])
print("Rockspec created! Moving it into the ./downloaded_modules/"..arg[1].." folder")
os.execute("mv "..arg[1].."-scm-1.rockspec ./downloaded_modules/"..arg[1])
print("Done!")
- return 0
+ return 0;
end
-- Command to install a rockspec with local sources
@@ -134,10 +134,10 @@ end
function commands.make(arg)
if arg[1] == "--help" then
show_usage([[make]], [[Installs a module with sources available locally]]);
- return 1
+ return 1;
end
os.execute("cd downloaded_modules/"..arg[1].." && luarocks --tree='../../plugins' make "..arg[1].."-scm-1.rockspec")
- return 0
+ return 0;
end
-- Command to remove a rockspec
@@ -145,7 +145,7 @@ end
function commands.remove(arg)
if arg[1] == "--help" then
show_usage([[make]], [[Removes a module installed in the wroking directory's plugins folder]]);
- return 1
+ return 1;
end
local flag = "--tree="
-- I'm considering the flag is the first, but there can be many flags
@@ -159,14 +159,14 @@ function commands.remove(arg)
print("Removing "..arg[1].." from ./plugins")
os.execute("luarocks --tree='"..prosody.paths.plugins.."' remove "..arg[1])
print("Done!")
- return 0
+ return 0;
end
end
function commands.install(arg)
if arg[1] == "--help" then
show_usage([[make]], [[Installs a rockspec/rock from a specified server]]);
- return 1
+ return 1;
end
-- Need to think about the case with many flags
local flag = "--tree="
@@ -180,7 +180,7 @@ function commands.install(arg)
else
print("Installing module "..arg[1].." locally, from luarocks repo")
os.execute("luarocks --tree='"..prosody.paths.plugins.."' install "..arg[1])
- return 0
+ return 0;
end
end
@@ -219,7 +219,7 @@ function commands.enabled_plugins(arg)
return 1;
end
for module in modulemanager.get_modules_for_host() do
- show_warning("%s", module)
+ show_warning("%s", module)
end
end
@@ -241,7 +241,7 @@ function commands.local_plugins(arg)
end
end
pfile:close()
- return 0
+ return 0;
end
function commands.adduser(arg)