summaryrefslogtreecommitdiff
path: root/src/libs/mynewt-nimble/porting/update_generated_files.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/mynewt-nimble/porting/update_generated_files.sh')
-rwxr-xr-xsrc/libs/mynewt-nimble/porting/update_generated_files.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/libs/mynewt-nimble/porting/update_generated_files.sh b/src/libs/mynewt-nimble/porting/update_generated_files.sh
index c01dddd2..6309ed2b 100755
--- a/src/libs/mynewt-nimble/porting/update_generated_files.sh
+++ b/src/libs/mynewt-nimble/porting/update_generated_files.sh
@@ -23,6 +23,7 @@ if [ ! -f "project.yml" ]; then
fi
declare -A targets=(
+ ["nuttx"]="repos/apache-mynewt-nimble/porting/examples/nuttx/"
["linux"]="repos/apache-mynewt-nimble/porting/examples/linux/"
["linux_blemesh"]="repos/apache-mynewt-nimble/porting/examples/linux_blemesh/"
["porting_default"]="repos/apache-mynewt-nimble/porting/nimble"
@@ -31,6 +32,11 @@ declare -A targets=(
for target in "${!targets[@]}"; do
echo "Updating target $target"
- newt build "$target" > /dev/null 2>&1
- cp "bin/@apache-mynewt-nimble/targets/${target}/generated/include" "${targets[$target]}" -r
+ newt build "@apache-mynewt-nimble/porting/targets/$target" > /dev/null 2>&1
+ cp "bin/@apache-mynewt-nimble/porting/targets/${target}/generated/include" "${targets[$target]}" -r
+ # Remove repo version and hash MYNEWT_VALS as it doesn't make much sense to commit them and they
+ # defeat the purpose of this script.
+ find "${targets[$target]}/include" -type f -name 'syscfg.h' -exec sed -i '/MYNEWT_VAL_REPO_*/,/#endif/d' {} \;
+ find "${targets[$target]}/include" -type f -name 'syscfg.h' -exec sed -i '/\/\*\*\* Repository/,/\*\//d' {} \;
+ find "${targets[$target]}/include" -type f -name 'syscfg.h' -exec sed -i '$!N;/^\n$/{$q;D;};P;D;' {} \;
done