mirror of https://github.com/OpenTTD/OpenTTD.git
Fix: remove manual single file generation in squirrel_export.sh as it's broken
This commit is contained in:
parent
34c438d7ad
commit
2cf9405aa2
|
@ -43,13 +43,11 @@ case $apilc in
|
||||||
*) echo "Unknown API type."; exit 1 ;;
|
*) echo "Unknown API type."; exit 1 ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
|
||||||
for f in `ls ../*.hpp`; do
|
for f in `ls ../*.hpp`; do
|
||||||
bf=`basename ${f} | sed s@script_@${apilc}_@`
|
bf=`basename ${f} | sed s@script_@${apilc}_@`
|
||||||
|
|
||||||
# ScriptController has custom code, and should not be generated
|
# ScriptController has custom code, and should not be generated
|
||||||
if [ "`basename ${f}`" = "script_controller.hpp" ]; then continue; fi
|
if [ "`basename ${f}`" = "script_controller.hpp" ]; then continue; fi
|
||||||
if [ "`basename ${f}`" = "script_object.hpp" ]; then continue; fi
|
|
||||||
|
|
||||||
${AWK} -v api=${apiuc} -f ${scriptdir}/squirrel_export.awk ${f} > ${bf}.tmp
|
${AWK} -v api=${apiuc} -f ${scriptdir}/squirrel_export.awk ${f} > ${bf}.tmp
|
||||||
|
|
||||||
|
@ -69,24 +67,6 @@ if [ -z "$1" ]; then
|
||||||
rm -f ${bf}.tmp
|
rm -f ${bf}.tmp
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
else
|
|
||||||
${AWK} -v api=${apiuc} -f ${scriptdir}/squirrel_export.awk $1 > $1.tmp
|
|
||||||
if [ `wc -l $1.tmp | cut -d\ -f1` -eq "0" ]; then
|
|
||||||
if [ -f "$1.sq" ]; then
|
|
||||||
echo "Deleted: $1.sq"
|
|
||||||
svn del --force $1.sq > /dev/null 2>&1
|
|
||||||
fi
|
|
||||||
rm -f $1.tmp
|
|
||||||
elif ! [ -f "${f}.sq" ] || [ -n "`diff -I '$Id' $1.sq $1.tmp 2> /dev/null || echo boo`" ]; then
|
|
||||||
mv $1.tmp $1.sq
|
|
||||||
echo "Updated: $1.sq"
|
|
||||||
svn add $1.sq > /dev/null 2>&1
|
|
||||||
svn propset svn:eol-style native $1.sq > /dev/null 2>&1
|
|
||||||
svn propset svn:keywords Id $1.sq > /dev/null 2>&1
|
|
||||||
else
|
|
||||||
rm -f $1.tmp
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Remove .hpp.sq if .hpp doesn't exist anymore
|
# Remove .hpp.sq if .hpp doesn't exist anymore
|
||||||
for f in `ls *.hpp.sq`; do
|
for f in `ls *.hpp.sq`; do
|
||||||
|
|
Loading…
Reference in New Issue