diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2018-03-14 12:55:14 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2018-03-14 12:55:14 +0000 |
commit | ac645ed6763094bb9fba7709de2e31e91d97a693 (patch) | |
tree | 6bda1e56785d86ee25937344d717778c068c16b7 /tools/updater/update_chconf_nil.sh | |
parent | 58fc5d04090b06449faa8e5269e469037797b5b2 (diff) | |
download | ChibiOS-ac645ed6763094bb9fba7709de2e31e91d97a693.tar.gz ChibiOS-ac645ed6763094bb9fba7709de2e31e91d97a693.tar.bz2 ChibiOS-ac645ed6763094bb9fba7709de2e31e91d97a693.zip |
NIL chconf.h files realignment.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11744 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'tools/updater/update_chconf_nil.sh')
-rw-r--r-- | tools/updater/update_chconf_nil.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/updater/update_chconf_nil.sh b/tools/updater/update_chconf_nil.sh new file mode 100644 index 000000000..bd4ac0ed8 --- /dev/null +++ b/tools/updater/update_chconf_nil.sh @@ -0,0 +1,22 @@ +#!/bin/bash
+if [ $# -eq 0 ]
+then
+ find ../.. -name "chconf.h" -exec bash update_chconf_nil.sh "{}" \;
+elif [ $# -eq 1 ]
+then
+ if egrep -q "_CHIBIOS_NIL_CONF_" $1
+ then
+ echo Processing: $1
+ cat $1 | egrep -e "\#define\s+[a-zA-Z0-9_]*\s+[a-zA-Z0-9_]" | cut --bytes=9- - | sed 's/ */=/g' > ./values.txt
+ if ! fmpp -q -C chconf_nil.fmpp
+ then
+ echo
+ echo "aborted"
+ exit 1
+ fi
+ cp ./chconf.h $1
+ rm ./chconf.h ./values.txt
+ fi
+else
+ echo "illegal number of arguments"
+fi
|