aboutsummaryrefslogtreecommitdiff
path: root/make.lua
blob: 4a7bbd70bb3f8968884e5e519812a778708a505d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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