Skip to content
Snippets Groups Projects
Select Git revision
  • af464144d1214dbf2a216eaf3b6216c56f06dee6
  • experimental default protected
  • v2023.2.5-ffs
  • nrb/ex400-remove-wps
  • nrb/airmax-test
  • v2023.2.4-ffs
  • nrb/ar9344-reset-sequence
  • autinerd/experimental-openwrt-24.10
  • v2023.2.3-ffs
  • v2023.2.2-ffs
  • v2023.2-ffs
  • v2023.1-ffs
  • v2022.1.4-ffs
  • feature/addMikrotikwAP
  • v2022.1.3-ffs
  • v2021.1.2-ffs
  • v2022.1.1-ffs
  • master protected
  • v2021.1.1-ffs
  • nrb/gluon-master-cpe510
  • v2021.1-ffs
  • experimental-2025-07-04
  • experimental-2025-07-04-base
  • experimental-2025-07-01
  • experimental-2025-07-01-base
  • experimental-2025-06-25
  • experimental-2025-06-25-base
  • experimental-2025-06-24
  • experimental-2025-06-24-base
  • experimental-2025-06-22
  • experimental-2025-06-22-base
  • v2023.2.5-ffs0.1
  • experimental-2025-06-08
  • experimental-2025-06-08-base
  • experimental-2025-06-06
  • experimental-2025-06-06-base
  • experimental-2025-05-27
  • experimental-2025-05-27-base
  • experimental-2025-05-18
  • experimental-2025-05-18-base
  • experimental-2025-05-15
41 results

copy_output.lua

Blame
  • target_config_check.lua 754 B
    local errors = false
    
    local function fail(msg)
    	if not errors then
    		errors = true
    		io.stderr:write('Configuration failed:', '\n')
    	end
    
    	io.stderr:write(' * ', msg, '\n')
    end
    
    local function match_config(expected, actual)
    	if expected == actual then
    		return true
    	end
    
    	if expected:gsub('=m$', '=y') == actual then
    		return true
    	end
    
    	return false
    end
    
    local function check_config(config)
    	for line in io.lines('openwrt/.config') do
    		if match_config(config, line) then
    			return true
    		end
    	end
    
    	return false
    end
    
    
    local lib = dofile('scripts/target_config_lib.lua')
    
    for _, config in pairs(lib.configs) do
    	if config.required then
    		if not check_config(config:format()) then
    			fail(config.required)
    		end
    	end
    end
    
    if errors then
    	os.exit(1)
    end