File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change 1010 VARIANT=" legacy"
1111fi
1212
13- for i in $( ls -d * / | grep -v node_modules) ; do
13+ if [ " $# " -gt 0 ]; then
14+ datasets=( " $@ " )
15+ else
16+ datasets=( $( ls -d * / | grep -v node_modules) )
17+ fi
18+
19+ echo " Will be validating ${# datasets[@]} dataset(s)"
20+ for i in " ${datasets[@]} " ; do
1421 echo -n " Validating dataset $i : "
1522
16- if [ -f ${i%%/ } /.SKIP_VALIDATION ]; then
17- echo " skipping validation"
23+ if [ -f " ${i%%/ } /.SKIP_VALIDATION" ]; then
24+ echo " skipping validation due to .SKIP_VALIDATION "
1825 continue
1926 fi
2027
@@ -23,18 +30,18 @@ for i in $(ls -d */ | grep -v node_modules); do
2330 CMD=" bids-validator ${i%%/ } $VALIDATOR_ARGS "
2431
2532 # Use default configuration unless overridden
26- if [[ ! ( -f ${i%%/ } /.bids-validator-config.json || $CMD =~ /--config/ ) ]]; then
27- CMD=" $CMD --config $PWD /${VARIANT} config.json"
33+ if [[ ! ( -f " ${i%%/ } /.bids-validator-config.json" || $CMD =~ /--config/ ) ]]; then
34+ CMD=" $CMD --config ' $PWD /${VARIANT} config.json' "
2835 fi
2936
3037 # Ignore NIfTI headers except for synthetic dataset
31- if [ $i != " synthetic/" ]; then
38+ if [ " $i " != " synthetic/" ]; then
3239 CMD=" $CMD --ignoreNiftiHeaders"
3340 else
3441 echo " validating NIfTI headers. "
3542 fi
3643
37- echo " Running " $CMD
44+ echo " Running $CMD "
3845
3946 $CMD || failed+=" $i "
4047done
You can’t perform that action at this time.
0 commit comments