2011-07-19 08:09:03 +00:00
|
|
|
#!/bin/sh
|
|
|
|
function verbmsg()
|
|
|
|
{
|
|
|
|
true
|
|
|
|
# echo $1
|
|
|
|
}
|
|
|
|
|
2011-07-20 05:05:58 +00:00
|
|
|
if test ! -d simulat0r/firmware -o ! -d firmware
|
|
|
|
then
|
|
|
|
echo ERROR:
|
|
|
|
echo This script must be run from toplevel r0ket directory
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2011-07-19 08:09:03 +00:00
|
|
|
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
|
|
|
|
|
2011-07-20 05:05:58 +00:00
|
|
|
echo "Updating bridge files for C source"
|
2011-07-19 08:09:03 +00:00
|
|
|
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
|
2011-07-20 05:05:58 +00:00
|
|
|
|
|
|
|
echo "Updating bridge files for Makefiles"
|
|
|
|
for i in `find firmware/ -type f -iname Makefile`
|
|
|
|
do
|
|
|
|
if test -f simulat0r/$i;
|
|
|
|
then
|
|
|
|
verbmsg "OK File already exists: $i"
|
|
|
|
else
|
|
|
|
echo Writing bridge file simulat0r/$i
|
|
|
|
(printf "# GENERATED INCLUDE BRIDGE/\n"; echo include `dirname $i | sed "s#[^/]*#..#g" `/../$i) >simulat0r/$i
|
|
|
|
fi
|
|
|
|
done
|
2011-07-24 21:58:26 +00:00
|
|
|
|
|
|
|
if cmp firmware/.gitignore simulat0r/firmware/.gitignore;
|
|
|
|
then
|
|
|
|
echo OK .gitignore is the same in firmware/ and simulat0r/firmware
|
|
|
|
else
|
|
|
|
echo WARNING: .gitignore mismatch in firmware/ and simulat0r/firmware
|
|
|
|
diff -y firmware/.gitignore simulat0r/firmware/.gitignore
|
|
|
|
fi
|