From ddd41971e145298dfb51b6efd1f104d18ec48c4c Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Tue, 7 Jan 2020 06:34:40 +0100 Subject: [PATCH] .bam/functions.lua: adding CopySettings functions --- .bam/functions.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.bam/functions.lua b/.bam/functions.lua index bbbaee6..1312770 100644 --- a/.bam/functions.lua +++ b/.bam/functions.lua @@ -23,6 +23,15 @@ function system() return nil end +-- Copy settings with a optional label prefix. +function CopySettings(settings, prefix) + local n = TableDeepCopy(settings) + if prefix ~= nil then + n.labelprefix = string.format("[%s] ", prefix) + end + return n +end + -- Defines a module -- path: base path to source files. -- src: table of source files.