🧑‍💻 Fix mfconfig trailing space

This commit is contained in:
Scott Lahteine 2023-06-05 17:25:42 -05:00
parent fbc5bd0d04
commit 6a29d5d5af

View file

@ -144,7 +144,7 @@ if [[ $ACTION == "init" ]]; then
find config -name "Conf*.h" -print0 | while read -d $'\0' fn ; do find config -name "Conf*.h" -print0 | while read -d $'\0' fn ; do
fldr=$(dirname "$fn") fldr=$(dirname "$fn")
blank_line=$(awk '/^\s*$/ {print NR; exit}' "$fn") blank_line=$(awk '/^\s*$/ {print NR; exit}' "$fn")
$SED -i~ "${blank_line}i\\\n#define CONFIG_EXAMPLES_DIR \"$fldr\"\\ " "$fn" $SED -i~ "${blank_line}i\\\n#define CONFIG_EXAMPLES_DIR \"$fldr\"" "$fn"
rm -f "$fn~" rm -f "$fn~"
done done
} }