Fix update-bridge-files.sh for BSD find

BSD find outputs a trailing slash when given on the command line, GNU
find does not. This can lead to path like firmware//lcd/image.c which
would fail with the used dirname and sed combination.
This commit is contained in:
Rainer Mueller 2011-08-06 21:42:17 +02:00
parent dbc8bb287a
commit de110ea5be
1 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@ exit
fi fi
echo "Updating directories" echo "Updating directories"
for i in `find firmware/ -type d ` for i in `find firmware -type d `
do do
if test -d simulat0r/$i if test -d simulat0r/$i
then verbmsg "OK Directory already exists: $i" then verbmsg "OK Directory already exists: $i"
@ -22,7 +22,7 @@ fi
done done
echo "Updating bridge files for C source" echo "Updating bridge files for C source"
for i in `find firmware/ \! -path firmware/lcd/allfonts.h \! -path firmware/l0dable/usetable.h -type f -iname \*.[ch]` for i in `find firmware \! -path firmware/lcd/allfonts.h \! -path firmware/l0dable/usetable.h -type f -iname \*.[ch]`
do do
if test -f simulat0r/$i; if test -f simulat0r/$i;
then then
@ -34,7 +34,7 @@ do
done done
echo "Updating bridge files for Makefiles" echo "Updating bridge files for Makefiles"
for i in `find firmware/ -type f -iname Makefile` for i in `find firmware -type f -iname Makefile`
do do
if test -f simulat0r/$i; if test -f simulat0r/$i;
then then