summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorMike Vink <mike@pionative.com>2025-02-03 21:29:42 +0100
committerMike Vink <mike@pionative.com>2025-02-03 21:29:42 +0100
commit5155816b7b925dec5d5feb1568b1d7ceb00938b9 (patch)
treedeca28ea15e79f6f804c3d90d2ba757881638af5 /src/bin
fetch tarballHEADmaster
Diffstat (limited to 'src/bin')
-rwxr-xr-xsrc/bin/luarocks35
-rwxr-xr-xsrc/bin/luarocks-admin18
2 files changed, 53 insertions, 0 deletions
diff --git a/src/bin/luarocks b/src/bin/luarocks
new file mode 100755
index 0000000..56caaa6
--- /dev/null
+++ b/src/bin/luarocks
@@ -0,0 +1,35 @@
+#!/usr/bin/env lua
+
+-- Load cfg first so that the loader knows it is running inside LuaRocks
+local cfg = require("luarocks.core.cfg")
+
+local loader = require("luarocks.loader")
+local cmd = require("luarocks.cmd")
+
+local description = "LuaRocks main command-line interface"
+
+local commands = {
+ init = "luarocks.cmd.init",
+ pack = "luarocks.cmd.pack",
+ unpack = "luarocks.cmd.unpack",
+ build = "luarocks.cmd.build",
+ install = "luarocks.cmd.install",
+ search = "luarocks.cmd.search",
+ list = "luarocks.cmd.list",
+ remove = "luarocks.cmd.remove",
+ make = "luarocks.cmd.make",
+ download = "luarocks.cmd.download",
+ path = "luarocks.cmd.path",
+ show = "luarocks.cmd.show",
+ new_version = "luarocks.cmd.new_version",
+ lint = "luarocks.cmd.lint",
+ write_rockspec = "luarocks.cmd.write_rockspec",
+ purge = "luarocks.cmd.purge",
+ doc = "luarocks.cmd.doc",
+ upload = "luarocks.cmd.upload",
+ config = "luarocks.cmd.config",
+ which = "luarocks.cmd.which",
+ test = "luarocks.cmd.test",
+}
+
+cmd.run_command(description, commands, "luarocks.cmd.external", ...)
diff --git a/src/bin/luarocks-admin b/src/bin/luarocks-admin
new file mode 100755
index 0000000..4a85e45
--- /dev/null
+++ b/src/bin/luarocks-admin
@@ -0,0 +1,18 @@
+#!/usr/bin/env lua
+
+-- Load cfg first so that luarocks.loader knows it is running inside LuaRocks
+local cfg = require("luarocks.core.cfg")
+
+local loader = require("luarocks.loader")
+local cmd = require("luarocks.cmd")
+
+local description = "LuaRocks repository administration interface"
+
+local commands = {
+ make_manifest = "luarocks.admin.cmd.make_manifest",
+ add = "luarocks.admin.cmd.add",
+ remove = "luarocks.admin.cmd.remove",
+ refresh_cache = "luarocks.admin.cmd.refresh_cache",
+}
+
+cmd.run_command(description, commands, "luarocks.admin.cmd.external", ...)