update chbuild script to use .skip files

This commit is contained in:
Fabien Poussin 2020-11-24 23:15:28 +01:00
parent e98c5dfed4
commit 2a1ee6d59e
No known key found for this signature in database
GPG Key ID: 6166CABA99FC385C
2 changed files with 2 additions and 17 deletions

View File

View File

@ -7,23 +7,10 @@
#
renice +10 $$
JOBS=$(grep -c ^processor /proc/cpuinfo)
JOBS=$(nproc)
SKIP_ARRAY=(Win32)
RETCODE=0
function test_skip {
Array=$1
SKIP=0
for var in "${SKIP_ARRAY[@]}"
do
if [[ $1 == *"${var}"* ]]; then
SKIP=1
break
fi
done
return $SKIP
}
function chbuild {
projects=$(find $1 -name Makefile -printf '%h ')
OK=0
@ -33,8 +20,7 @@ function chbuild {
SKIPPED=()
for t in $projects
do
test_skip $t
if [ $? -ne 0 ]; then
if [[ -f "${t}/.skip" ]]; then
printf "SKIPPING: ${t}\n"
SKIPPED+=($t)
continue
@ -57,7 +43,6 @@ function chbuild {
popd > /dev/null
done
printf "\n${1}: ${OK} builds ok, ${NOK} builds failed\n"
# printf 'SUCCESS: %s\n' "${SUCCESS[@]}"
printf 'FAIL: %s\n' "${FAIL[@]}"
printf 'SKIPPED: %s\n' "${SKIPPED[@]}"
printf "\n"