mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-04 15:01:12 +00:00
Skip writing reflection_generated.h if not changed (#5776)
This commit is contained in:
@@ -15,4 +15,16 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
../flatc -c --cpp-std c++0x --no-prefix -o ../include/flatbuffers reflection.fbs
|
tempDir="../include/flatbuffers/.tmp"
|
||||||
|
originalFile="../include/flatbuffers/reflection_generated.h"
|
||||||
|
newFile="$tempDir/reflection_generated.h"
|
||||||
|
|
||||||
|
../flatc -c --cpp-std c++0x --no-prefix -o $tempDir reflection.fbs
|
||||||
|
|
||||||
|
if [ -f "$newFile" ]; then
|
||||||
|
if ! cmp -s "$originalFile" "$newFile"; then
|
||||||
|
mv $newFile $original
|
||||||
|
fi
|
||||||
|
rm $newFile
|
||||||
|
rmdir $tempDir
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user