mirror of
https://github.com/worldforge/ember
synced 2026-08-13 16:23:06 -04:00
8 lines
643 B
Bash
Executable file
8 lines
643 B
Bash
Executable file
#! /bin/sh
|
|
#tolua++ will for some reason translate "const std::string" into "const,std::string", so we need to remove these incorrect commas from the final code
|
|
#some versions will also for some unexplainable reason not correctly remove the tolua specific directive tolua_outside, so we need to clean that out also
|
|
#stripping date to not having conflicts in version control system on regeneration
|
|
echo "Updating lua bindings."
|
|
tolua++ -n $1 $2 > $3
|
|
grep -q '** tolua internal error' $3 && cat $3 && exit 1
|
|
sed -i -e 's/const,/const /g' -e 's/tolua_outside//g' -e 's/\(Generated automatically by tolua++-[\.0-9]*\) on [A-Za-z0-9: ]*\./\1./' $3
|