Software /
code /
prosody
Diff
prosodyctl @ 10139:7aa3d8155c96
prosodyctl: Added the 'make' function
author | João Duarte <jvsDuarte08@gmail.com> |
---|---|
date | Tue, 16 Jul 2019 10:26:44 -0700 |
parent | 10138:e1ca0d1b5467 |
child | 10140:cf0ae6eb74e6 |
line wrap: on
line diff
--- a/prosodyctl Tue Jul 16 10:08:12 2019 -0700 +++ b/prosodyctl Tue Jul 16 10:26:44 2019 -0700 @@ -129,6 +129,17 @@ return 0 end +-- Command to install a rockspec with local sources +-- The module is installed at the plugins folder +function commands.make(arg) + if arg[1] == "--help" then + show_usage([[make]], [[Installs a module with sources available locally]]); + return 1 + end + os.execute("cd downloaded_modules/"..arg[1].." && luarocks --tree='../../plugins' make "..arg[1].."-scm-1.rockspec") + return 0 +end + function commands.list(arg) if not arg[1] or arg[1] == "--help" then show_usage([[list]], [[Shows installed rocks]]);