replaced several -e by single OR expression, extracted duplicated suffixes

This commit is contained in:
Jiri 2023-12-14 15:44:10 +01:00
parent 2e9bc90b6c
commit 2aed69fb8b

View File

@ -1301,14 +1301,15 @@ function findGeneratedSources() {
local sourcesName=$(basename ${sources})
local sourcesParent=$(dirname ${sources})
local target=${sourcesParent}/${targetDirParent}/%{generated_sources_name}
local suffixes="cpp|hpp|h|hh|rl"
mkdir -p $target
pushd ${builtJdk}
mkdir -p ${target}/${builtJdkName}
cp --parents $(find . | grep -e "\.cpp$" -e "\.hpp$" -e "\.h$" -e "\.hh$" -e "\.rl$" -e "NONE$") ${target}/${builtJdkName}
cp --parents $(find . | grep -e ".*\.($suffixes)$" -e "NONE$") ${target}/${builtJdkName}
popd
pushd ${sources}
mkdir -p ${target}/${sourcesName}
cp --parents $(find make | grep -e "\.cpp$" -e "\.hpp$" -e "\.h$" -e "\.hh$" -e "\.rl$" -e "NONE$") ${target}/${sourcesName}
cp --parents $(find make | grep -e -e ".*\.($suffixes)$" -e "NONE$") ${target}/${sourcesName}
popd
}