mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-04 17:42:23 +00:00

This avoids the other file with binary data. (cherry-picked from commit 212601deab6ba803db3e0b4ed8ee5d0cbc3f3018)
20 lines
754 B
Bash
Executable File
20 lines
754 B
Bash
Executable File
#!/bin/bash
|
|
# Install isutf8 program (from package "moreutils" at least in linux mint) in order to use this script.
|
|
#
|
|
# This script assumes that the current working directory is the root of the wesnoth repository.
|
|
exit_code=0
|
|
|
|
find src/ -type f -print0 | xargs -0 isutf8 -- || exit_code=1
|
|
find data/ -not -name "*.png" -not -name "*.ogg" -not -name "*.jpg" -not -name "*.wav" -not -name "*.gif" -not -name "*.xcf" -not -name "*.bin" \
|
|
-not -name "test_cve_2018_1999023_2.cfg" -type f -print0 | xargs -0 isutf8 -- || exit_code=1
|
|
find po/ -type f -print0 | xargs -0 isutf8 -- || exit_code=1
|
|
|
|
isutf8 changelog.md || exit_code=1
|
|
isutf8 RELEASE_NOTES || exit_code=1
|
|
|
|
if [ $exit_code != 0 ]; then
|
|
echo "Found invalid UTF8 file(s)!"
|
|
fi
|
|
|
|
exit $exit_code
|