I made a great mistake

This commit is contained in:
tema5002
2026-05-23 21:58:22 +03:00
parent cdb90d236d
commit 19e8e1356b

View File

@@ -1,7 +1,5 @@
#!/usr/bin/env lua #!/usr/bin/env lua
-- i love build scripts i love build scripts i love build scripts scripts build love i script build love me i love script build i script love build -- i love build scripts i love build scripts i love build scripts scripts build love i script build love me i love script build i script love build
local args = {...}
local isBlendi = os.getenv("USER") == "blendi" local isBlendi = os.getenv("USER") == "blendi"
local separator = package.config:sub(1,1) local separator = package.config:sub(1,1)
@@ -30,7 +28,7 @@ local function fixPath(path)
return new return new
end end
if args[1] == "clean" then if arg[1] == "clean" then
if separator == '\\' then if separator == '\\' then
runCommand("rmdir /s /q build 2>nul") runCommand("rmdir /s /q build 2>nul")
else else
@@ -98,7 +96,7 @@ for i = 1,#files do
if needsRebuild(fname, out) then if needsRebuild(fname, out) then
needsLinking = true needsLinking = true
runCommand('clang -c -o ' .. out .. ' ' .. fname .. ' ' .. table.concat(coolArgs, ' ')) runCommand('clang -g -c -o ' .. out .. ' ' .. fname .. ' ' .. table.concat(coolArgs, ' '))
end end
objects[#objects+1] = out; objects[#objects+1] = out;
@@ -107,9 +105,9 @@ end
local exe = separator == '\\' and ".\\noom.exe" or "./noom" local exe = separator == '\\' and ".\\noom.exe" or "./noom"
if needsLinking then if needsLinking then
runCommand('clang -o ' .. exe .. ' ' .. table.concat(objects, ' ') .. ' ' .. table.concat(coolArgs, ' ')) runCommand('clang -g -o ' .. exe .. ' ' .. table.concat(objects, ' ') .. ' ' .. table.concat(coolArgs, ' '))
end end
if args[1] == "run" then if arg[1] == "run" then
runCommand(exe) runCommand(exe)
end end