From a24eb691fbf60ed6a16b4f3c51258a7a9d4033aa Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 8 May 2021 05:49:06 -0500 Subject: [PATCH] Better opt_set comment of old val --- buildroot/bin/opt_set | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildroot/bin/opt_set b/buildroot/bin/opt_set index d2d0cc241..3f67d7890 100755 --- a/buildroot/bin/opt_set +++ b/buildroot/bin/opt_set @@ -8,7 +8,7 @@ SED=$(which gsed || which sed) while [[ $# > 1 ]]; do DID=0 for FN in Configuration Configuration_adv; do - "${SED}" -i "/^\(\s*\)\/*\s*\(#define\s\+${1}\b\)\(.*\)$/{s//\1\2 ${2} \/\/ \3/;h};\${x;/./{x;q0};x;q9}" Marlin/$FN.h && DID=1 + "${SED}" -i "/^\(\s*\)\/*\s*\(#define\s\+${1}\b\) *\(.*\)$/{s//\1\2 ${2} \/\/ \3/;h};\${x;/./{x;q0};x;q9}" Marlin/$FN.h && DID=1 done ((DID)) || eval "echo '#define ${1} ${2}' >>Marlin/Configuration.h" ||