658cf5bc54
The sed syntax of '0,/regexp/' is GNU specific and fails with non GNU sed in FreeBSD. To solve the issue we can use awk instead to remove duplicates. The awk script basically keeps the last config value, while maintaining order and comments from original config file. Fixes: b2063f104db7 ("mk: filter duplicate configuration entries") Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com> Acked-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>