diff --git a/scripts/common.inc.lua b/scripts/common.inc.lua index 0ec5a756..5b96b386 100644 --- a/scripts/common.inc.lua +++ b/scripts/common.inc.lua @@ -1,8 +1,8 @@ env = setmetatable({}, { - __index = function(t, k) return os.getenv(k) end + __index = function(_, k) return os.getenv(k) end }) envtrue = setmetatable({}, { - __index = function(t, k) return (tonumber(os.getenv(k)) or 0) > 0 end + __index = function(_, k) return (tonumber(os.getenv(k)) or 0) > 0 end }) assert(env.GLUON_SITEDIR) @@ -117,7 +117,10 @@ end local image_mt = { __index = { dest_name = function(image, name, site, release) - return env.GLUON_IMAGEDIR..'/'..image.subdir, 'gluon-'..(site or site_code)..'-'..(release or env.GLUON_RELEASE)..'-'..name..image.out_suffix..image.extension + return env.GLUON_IMAGEDIR .. '/' .. image.subdir, + 'gluon-' .. (site or site_code) .. '-' + .. (release or env.GLUON_RELEASE) .. '-' + .. name .. image.out_suffix .. image.extension end, }, } diff --git a/scripts/copy_output.lua b/scripts/copy_output.lua index dc679507..75938f16 100755 --- a/scripts/copy_output.lua +++ b/scripts/copy_output.lua @@ -40,7 +40,8 @@ for _, image in ipairs(images) do clean(image, image.image) local destdir, destname = image:dest_name(image.image) - local source = string.format('openwrt/bin/targets/%s/openwrt-%s-%s%s%s', bindir, openwrt_target, image.name, image.in_suffix, image.extension) + local source = string.format('openwrt/bin/targets/%s/openwrt-%s-%s%s%s', bindir, + openwrt_target, image.name, image.in_suffix, image.extension) exec {'cp', source, destdir..'/'..destname} diff --git a/scripts/target_config.inc.lua b/scripts/target_config.inc.lua index e001148b..0d1e165d 100644 --- a/scripts/target_config.inc.lua +++ b/scripts/target_config.inc.lua @@ -69,7 +69,8 @@ for _, dev in ipairs(devices) do handle_pkg(pkg) end - config_message(string.format("unable to enable device '%s'", profile), 'CONFIG_TARGET_DEVICE_%s_DEVICE_%s=y', openwrt_config_target, profile) + config_message(string.format("unable to enable device '%s'", profile), + 'CONFIG_TARGET_DEVICE_%s_DEVICE_%s=y', openwrt_config_target, profile) config('CONFIG_TARGET_DEVICE_PACKAGES_%s_DEVICE_%s="%s"', openwrt_config_target, profile, device_pkgs) end diff --git a/scripts/target_config_check.lua b/scripts/target_config_check.lua index abb1487b..fcce86ff 100755 --- a/scripts/target_config_check.lua +++ b/scripts/target_config_check.lua @@ -49,7 +49,7 @@ end function config_package(pkg, value) local pattern = string.format('CONFIG_PACKAGE_%s=%s', pkg, value) - local ret + local res if value == 'y' then res = check_config(pattern) else