crashtest-r0ket/simulat0r/bin/update-bridge-files.sh

28 lines
597 B
Bash
Raw Normal View History

2011-07-19 08:09:03 +00:00
#!/bin/sh
function verbmsg()
{
true
# echo $1
}
echo "Updating directories"
for i in `find firmware/ -type d `
do
if test -d simulat0r/$i
then verbmsg "OK Directory already exists: $i"
else mkdir -v simulat0r/$i
fi
done
echo "Updating bridge files"
for i in `find firmware/ \! -path firmware/lcd/allfonts.h -type f -iname \*.[ch]`
do
if test -f simulat0r/$i;
then
verbmsg "OK File already exists: $i"
else
echo Writing bridge file simulat0r/$i
(printf "/* AUTOGENERATED SOURCE FILE */\n"; echo \#include \"`dirname $i | sed "s#[^/]*#..#g" `/../$i\") >simulat0r/$i
fi
done