aboutsummaryrefslogtreecommitdiff
path: root/make.lua
diff options
context:
space:
mode:
authordacctal <donotcontactmevia@email.invalid>2026-10-24 20:00:58 +0000
committerdacctal <donotcontactmevia@email.invalid>2026-10-24 20:00:58 +0000
commit87e20545c6a04350196b26984d16533434671dab (patch)
tree222b362d4b2590268aa1fac3406d0488daadf6da /make.lua
parentc37341416b47bec24f32a49219b6f6259f641370 (diff)
MAKEFILE IS REDUNDANT
Diffstat (limited to 'make.lua')
-rwxr-xr-xmake.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/make.lua b/make.lua
new file mode 100755
index 0000000..4a7bbd7
--- /dev/null
+++ b/make.lua
@@ -0,0 +1,20 @@
+#!/usr/bin/env luajit
+local bldit = require("bldit")
+bldit.opts.prefix = os.getenv("PREFIX")
+if bldit.opts.prefix == nil then
+ bldit.opts.prefix = os.getenv("HOME").."/.local"
+end
+
+for i,a in ipairs(arg) do
+ if i >= 1 then
+ if bldit.recipe[a] == nil then
+ print("function '"..a.."' doesn't exist")
+ else
+ bldit.recipe[a]()
+ end
+ end
+end
+
+if arg[1] == nil then
+ bldit.recipe.build()
+end