File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 22
33set -eo pipefail
44
5+ jbig_files=(Tests/LibGfx/test-inputs/jbig2/* .jbig2)
6+ json_files=(Tests/LibGfx/test-inputs/jbig2/json/* .json)
7+
8+ if [ " ${# jbig_files[@]} " -gt " ${# json_files[@]} " ]; then
9+ echo " More jbig2 than json files. Don't add non-json-based jbig2 files."
10+ exit 1
11+ fi
12+
13+ if [ " ${# jbig_files[@]} " -lt " ${# json_files[@]} " ]; then
14+ echo " More json than jbig2 files. Did you forget to 'git add'?"
15+ exit 1
16+ fi
17+
518trap ' git diff --exit-code' EXIT
619
720script_path=$( cd -P -- " $( dirname -- " $0 " ) " && pwd -P)
@@ -20,7 +33,7 @@ if [ -z "${JBIG2_FROM_JSON_BINARY:-}" ] ; then
2033 JBIG2_FROM_JSON_BINARY=" Build/lagom/bin/jbig2-from-json"
2134fi
2235
23- for f in Tests/LibGfx/test-inputs/jbig2/json/ * .json ; do
36+ for f in " ${json_files[@]} " ; do
2437 f_jb2=Tests/LibGfx/test-inputs/jbig2/$( basename " ${f% .json} .jbig2" )
2538 " $JBIG2_FROM_JSON_BINARY " -o " $f_jb2 " " $f "
2639done
You can’t perform that action at this time.
0 commit comments