gluon/scripts/clean_output.lua
Matthias Schiffer 071cf7b20f
Switch to Lua for target definitions
The old bash-based parsing code was way too complex. Replace it with Lua.
2019-06-15 23:34:07 +02:00

18 lines
426 B
Lua
Executable File

dofile('scripts/common.inc.lua')
local subtarget = env.SUBTARGET
if subtarget == '' then
subtarget = 'generic'
end
local bindir = env.BOARD .. '/' .. subtarget
exec({'rm', '-f', 'openwrt/bin/targets/'..bindir..'/\0'}, true, '2>/dev/null')
-- Full builds will output the "packages" directory, so clean up first
if (env.GLUON_DEVICES or '') == '' then
exec {'rm', '-rf', 'openwrt/bin/targets/'..bindir..'/packages'}
end