diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2016-09-28 11:45:33 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2016-09-28 16:34:22 +0200 |
commit | e0ffde7bc216083966ed575902513e6f06d9bafc (patch) | |
tree | 7d6e68a284a8a2397a5edffff34d400b4158c9bf /scripts | |
parent | 3f3fc7b7723698e44427e2a14a2f4906832800bf (diff) | |
download | qtlocation-mapboxgl-e0ffde7bc216083966ed575902513e6f06d9bafc.tar.gz |
[build] use git ls-files so we only include tracked files
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/generate-core-files.sh | 2 | ||||
-rwxr-xr-x | scripts/generate-test-files.sh | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/scripts/generate-core-files.sh b/scripts/generate-core-files.sh index a14239b8f2..27754306e1 100755 --- a/scripts/generate-core-files.sh +++ b/scripts/generate-core-files.sh @@ -7,7 +7,7 @@ echo "# Do not edit. Regenerate this with ./scripts/generate-core-files.sh" > cm echo "" >> cmake/core-files.cmake echo "set(MBGL_CORE_FILES" >> cmake/core-files.cmake PREFIX= -for FILE in $(find include src -type f -a \( -name "*.hpp" -o -name "*.cpp" -o -name "*.h" -o -name "*.c" \) | perl -p -e "s/^((src|include)\/(mbgl\/)?(.+)\/\w+\.\w+)$/\$4#\$1/g" | sort) ; do +for FILE in $(git ls-files "include/*.hpp" "include/*.h" "src/*.hpp" "src/*.cpp" "src/*.h" "src/*.c" | perl -p -e "s/^((src|include)\/(mbgl\/)?(.+)\/\w+\.\w+)$/\$4#\$1/g" | sort) ; do CURRENT_PREFIX="${FILE%#*}" if [ "${PREFIX}" != "${CURRENT_PREFIX}" ]; then if [ ! -z "${PREFIX}" ]; then echo "" >> cmake/core-files.cmake ; fi diff --git a/scripts/generate-test-files.sh b/scripts/generate-test-files.sh index 0af6828c66..5f507d3edf 100755 --- a/scripts/generate-test-files.sh +++ b/scripts/generate-test-files.sh @@ -7,7 +7,7 @@ echo "# Do not edit. Regenerate this with ./scripts/generate-test-files.sh" > cm echo "" >> cmake/test-files.cmake echo "set(MBGL_TEST_FILES" >> cmake/test-files.cmake PREFIX= -for FILE in $(find test -type f -a \( -name "*.hpp" -o -name "*.cpp" -o -name "*.h" -o -name "*.c" \) | sort) ; do +for FILE in $(git ls-files "test/*.hpp" "test/*.cpp" "test/*.h" "test/*.c" | sort) ; do CURRENT_PREFIX=$(dirname ${FILE#test/}) if [ "${PREFIX}" != "${CURRENT_PREFIX}" ]; then if [ ! -z "${PREFIX}" ]; then echo "" >> cmake/test-files.cmake ; fi |