[fontbakery-check-collection.sh] use fontbakery check-googlefonts; also simpliefied.
@@ -6,10 +6,10 @@ else
exit 1
fi
-APACHE_FOLDERS=$COLLECTION_FOLDER/apache/*/
-OFL_FOLDERS=$COLLECTION_FOLDER/ofl/*/
-UFL_FOLDERS=$COLLECTION_FOLDER/ufl/*/
-RESULTS_FOLDER=$COLLECTION_FOLDER/check_results/
+APACHE_FOLDERS=$COLLECTION_FOLDER/apache/*
+OFL_FOLDERS=$COLLECTION_FOLDER/ofl/*
+UFL_FOLDERS=$COLLECTION_FOLDER/ufl/*
+RESULTS_FOLDER=$COLLECTION_FOLDER/check_results
mkdir $RESULTS_FOLDER -p
rm $RESULTS_FOLDER/issues.txt -f
@@ -18,22 +18,12 @@ rm $COLLECTION_FOLDER/*/*/*fontbakery.*
for f in $APACHE_FOLDERS $OFL_FOLDERS $UFL_FOLDERS
do
- LOGDIR=$RESULTS_FOLDER/$(basename $f)
echo "$f" >> $RESULTS_FOLDER/all_fonts.txt
-
- if [ "$(ls -A $LOGDIR)" ]
- then
- echo "Skipping '$f'"
- else
echo "Processing '$f'..."
- fontbakery check-ttf "$f*.ttf" --json --ghm --error
- mkdir -p $LOGDIR
- mv $f/CrossFamilyChecks.fontbakery.* $LOGDIR/ || echo "$f CrossFamilyChecks" >> $RESULTS_FOLDER/issues.txt
- for font in $f/*.ttf
- do
- mv $font.fontbakery.* $LOGDIR/ || echo "$font" >> $RESULTS_FOLDER/issues.txt
- done
- fi
+ LICENSE_DIR=$(basename "$(dirname $f)")
+ REPORT=$RESULTS_FOLDER/$LICENSE_DIR/$(basename $f).json
+ mkdir -p $(dirname $REPORT)
+ fontbakery check-googlefonts --json $REPORT "$f/*.ttf"
done
cat $RESULTS_FOLDER/issues.txt
