From 416fb66118ed7101de7b0820f20be1e9f011200d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 10 Apr 2022 08:43:11 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Strip=20#er?= =?UTF-8?q?rors=20in=20Configurations=20deployment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildroot/share/git/mfconfig | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/buildroot/share/git/mfconfig b/buildroot/share/git/mfconfig index 70642a5d39cb..d3e0b67b3e40 100755 --- a/buildroot/share/git/mfconfig +++ b/buildroot/share/git/mfconfig @@ -74,6 +74,8 @@ if [[ $ACTION == "init" ]]; then # a 'BASE' branch with only defaults as a starting point. # + SED=$(which gsed sed | head -n1) + echo "- Initializing BASE branch..." # Use the import branch as the source @@ -82,6 +84,14 @@ if [[ $ACTION == "init" ]]; then # Copy to a temporary location TEMP=$( mktemp -d ) ; cp -R config $TEMP + # Strip all #error lines + IFS=$'\n'; set -f + for fn in $( find $TEMP/config -type f -name "Configuration.h" ); do + $SED -i~ -e "20,30{/#error/d}" "$fn" + rm "$fn~" + done + unset IFS; set +f + # Make sure we're not on the 'BASE' branch... git checkout init-repo >/dev/null 2>&1 || exit @@ -149,7 +159,6 @@ if [[ $ACTION == "init" ]]; then ((COMMIT_STEPS)) && git add . >/dev/null && git commit -m "Reset TPARA..." >/dev/null # Update the %VERSION% in the README.md file - SED=$(which gsed sed | head -n1) VERS=$( echo $EXPORT | $SED 's/release-//' ) eval "${SED} -E -i~ -e 's/%VERSION%/$VERS/g' README.md" rm -f README.md~