mirror of
https://github.com/apache/nuttx.git
synced 2025-12-07 10:03:38 +08:00
Deal with "sed -i" portability
An empty extension for sed -i is not widely available. * Where it isn't available (eg. macOS's sed) "sed -i -e" will create a backup file with the "-e" suffix. * Even GNU sed documentation says it's "not recommended". This commit deals with it by: * Replace it with a more appropriate tool (kconfig-tweak) * Or, specify the extension (.bak)
This commit is contained in:
committed by
Alin Jerpelea
parent
fbc68912b9
commit
fc7cddee39
@@ -244,12 +244,11 @@ function configure {
|
||||
varname=`echo $setting | cut -d'=' -f1`
|
||||
if [ ! -z "$varname" ]; then
|
||||
echo " Disabling $varname"
|
||||
sed -i -e "/$varname/d" $nuttx/.config
|
||||
kconfig-tweak --file $nuttx/.config -d $varname
|
||||
fi
|
||||
|
||||
echo " Enabling $toolchain"
|
||||
sed -i -e "/$toolchain/d" $nuttx/.config
|
||||
echo "$toolchain=y" >> $nuttx/.config
|
||||
kconfig-tweak --file $nuttx/.config -e $toolchain
|
||||
|
||||
makefunc olddefconfig
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user