From c7937d65b7830412b809e5dcbad72f44a9f0110e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 11 Oct 2021 19:49:04 +0800 Subject: no need to specify entry script --- make/bootstrap.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'make/bootstrap.lua') diff --git a/make/bootstrap.lua b/make/bootstrap.lua index 77f1a4d0..42e34890 100644 --- a/make/bootstrap.lua +++ b/make/bootstrap.lua @@ -11,10 +11,6 @@ while true do i = i + 1 end -if arg[i] == nil then - return -end - for j = -1, #arg do arg[j - i] = arg[j] end @@ -38,4 +34,6 @@ package.path = table.concat({ root .. "/script/?.lua", root .. "/script/?/init.lua", }, ";") -assert(loadfile(arg[0]))(table.unpack(arg)) + +local main = arg[0] or 'main.lua' +assert(loadfile(main))(table.unpack(arg)) -- cgit v1.2.3