scripts/list-source-files: exclude build artifacts when not in vcs tree

This commit is contained in:
Ville Skyttä
2020-05-15 20:42:15 +03:00
committed by Bart Van Assche
parent 5243ff47dd
commit e9202cb257

View File

@@ -39,7 +39,17 @@ list_source_files() {
hg manifest
fi
else
( cd "$d" && find . -type f -o -type l | sed 's|^\./||' )
(
cd "$d" &&
find . -type f -o -type l | \
sed -e 's|^\./||' \
-e '\|\.k\{0,1\}o\(\.\(cm\)\{0,1\}d\)\{0,1\}$|d' \
-e '\|\.mod\(\.c\)\{0,1\}$|d' \
-e '\|/conftest/.*/result-.*\.txt$|d' \
-e '\|/modules\.order$|d' \
-e '\,/Module\.\(symver\|marker\)s$,d' \
-e '\,/\.tmp_versions\(/\|$\),d'
)
fi
}