You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/11/04 14:40:35 UTC

(nuttx) branch master updated: macos : fix “sed: -I or -i may not be used with stdin”

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 3c4053a385 macos : fix “sed: -I or -i may not be used with stdin”
3c4053a385 is described below

commit 3c4053a3850091a039abb3af29be33a2a8c8bb5e
Author: simbit18 <10...@users.noreply.github.com>
AuthorDate: Mon Nov 4 12:25:04 2024 +0100

    macos : fix “sed: -I or -i may not be used with stdin”
    
    tools/Unix.mk
    added $(call DELFILE, .config.backup)
    
    tools/process-config.sh
    sed-i -> sed -i.backup
---
 tools/Unix.mk           | 1 +
 tools/process_config.sh | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/Unix.mk b/tools/Unix.mk
index 36f8f073fc..e72ecc7743 100644
--- a/tools/Unix.mk
+++ b/tools/Unix.mk
@@ -799,6 +799,7 @@ endif
 	$(call DELFILE, .config)
 	$(call DELFILE, .config.old)
 	$(call DELFILE, .config.orig)
+	$(call DELFILE, .config.backup)
 	$(call DELFILE, .gdbinit)
 
 # Application housekeeping targets.  The APPDIR variable refers to the user
diff --git a/tools/process_config.sh b/tools/process_config.sh
index 6d1be7e55a..067e65f104 100755
--- a/tools/process_config.sh
+++ b/tools/process_config.sh
@@ -57,7 +57,7 @@ process_file() {
             fi
         else
             local key_config="$(echo "$line" | cut -d= -f1)="
-            sed -i "/$key_config/d" $output_file
+            sed -i.backup "/$key_config/d" $output_file
             echo "$line" >> $output_file
         fi
     done < "$input_file"