Updated scripts.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11762 110e8d01-0319-4d1e-a829-52ad28d1bb01
This commit is contained in:
parent
4ed8683d35
commit
e556077ee5
|
@ -1,13 +1,19 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
if [ $# -eq 0 ]
|
if [ $# -eq 2 ]
|
||||||
then
|
then
|
||||||
find ../.. -name "chconf.h" -exec bash update_chconf_nil.sh "{}" \;
|
if [ $1 = "rootpath" ]
|
||||||
|
then
|
||||||
|
find $2 -name "chconf.h" -exec bash update_chconf_nil.sh "{}" \;
|
||||||
|
else
|
||||||
|
echo "Usage: update_chconf_nil.sh [rootpath <root path>]"
|
||||||
|
fi
|
||||||
elif [ $# -eq 1 ]
|
elif [ $# -eq 1 ]
|
||||||
then
|
then
|
||||||
if egrep -q "_CHIBIOS_NIL_CONF_" $1
|
declare conffile=$(<$1)
|
||||||
|
if egrep -q "_CHIBIOS_NIL_CONF_" <<< "$conffile"
|
||||||
then
|
then
|
||||||
echo Processing: $1
|
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
|
egrep -e "\#define\s+[a-zA-Z0-9_]*\s+[a-zA-Z0-9_]" <<< "$conffile" | sed 's/\#define //g; s/ */=/g' > ./values.txt
|
||||||
if ! fmpp -q -C chconf_nil.fmpp
|
if ! fmpp -q -C chconf_nil.fmpp
|
||||||
then
|
then
|
||||||
echo
|
echo
|
||||||
|
@ -18,5 +24,6 @@ then
|
||||||
rm ./chconf.h ./values.txt
|
rm ./chconf.h ./values.txt
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "illegal number of arguments"
|
echo "Usage: update_chconf_nil.sh [rootpath <root path>]"
|
||||||
|
echo " update_chconf_nil.sh <configuration file>]"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,13 +1,19 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
if [ $# -eq 0 ]
|
if [ $# -eq 2 ]
|
||||||
then
|
then
|
||||||
find ../.. -name "chconf.h" -exec bash update_chconf_rt.sh "{}" \;
|
if [ $1 = "rootpath" ]
|
||||||
|
then
|
||||||
|
find $2 -name "chconf.h" -exec bash update_chconf_rt.sh "{}" \;
|
||||||
|
else
|
||||||
|
echo "Usage: update_chconf_rt.sh [rootpath <root path>]"
|
||||||
|
fi
|
||||||
elif [ $# -eq 1 ]
|
elif [ $# -eq 1 ]
|
||||||
then
|
then
|
||||||
if egrep -q "_CHIBIOS_RT_CONF_" $1
|
declare conffile=$(<$1)
|
||||||
|
if egrep -q "_CHIBIOS_RT_CONF_" <<< "$conffile"
|
||||||
then
|
then
|
||||||
echo Processing: $1
|
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
|
egrep -e "\#define\s+[a-zA-Z0-9_]*\s+[a-zA-Z0-9_]" <<< "$conffile" | sed 's/\#define //g; s/ */=/g' > ./values.txt
|
||||||
if ! fmpp -q -C chconf_rt.fmpp
|
if ! fmpp -q -C chconf_rt.fmpp
|
||||||
then
|
then
|
||||||
echo
|
echo
|
||||||
|
@ -18,5 +24,6 @@ then
|
||||||
rm ./chconf.h ./values.txt
|
rm ./chconf.h ./values.txt
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "illegal number of arguments"
|
echo "Usage: update_chconf_rt.sh [rootpath <root path>]"
|
||||||
|
echo " update_chconf_rt.sh <configuration file>]"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,13 +1,19 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
if [ $# -eq 0 ]
|
if [ $# -eq 2 ]
|
||||||
then
|
then
|
||||||
find ../.. -name "halconf.h" -exec bash update_halconf.sh "{}" \;
|
if [ $1 = "rootpath" ]
|
||||||
|
then
|
||||||
|
find $2 -name "halconf.h" -exec bash update_halconf.sh "{}" \;
|
||||||
|
else
|
||||||
|
echo "Usage: update_halconf.sh [rootpath <path>]"
|
||||||
|
fi
|
||||||
elif [ $# -eq 1 ]
|
elif [ $# -eq 1 ]
|
||||||
then
|
then
|
||||||
# if egrep -q "" $1
|
declare conffile=$(<$1)
|
||||||
|
# if egrep -q "" <<< "$conffile"
|
||||||
# then
|
# then
|
||||||
echo Processing: $1
|
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
|
egrep -e "\#define\s+[a-zA-Z0-9_]*\s+[a-zA-Z0-9_]" <<< "$conffile" | sed 's/\#define //g; s/ */=/g' > ./values.txt
|
||||||
if ! fmpp -q -C halconf.fmpp
|
if ! fmpp -q -C halconf.fmpp
|
||||||
then
|
then
|
||||||
echo
|
echo
|
||||||
|
@ -18,5 +24,6 @@ then
|
||||||
rm ./halconf.h ./values.txt
|
rm ./halconf.h ./values.txt
|
||||||
# fi
|
# fi
|
||||||
else
|
else
|
||||||
echo "illegal number of arguments"
|
echo "Usage: update_halconf.sh [rootpath <root path>]"
|
||||||
|
echo " update_halconf.sh <configuration file>]"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue