File tree 1 file changed +13
-6
lines changed 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change 10
10
VARIANT=" legacy"
11
11
fi
12
12
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
14
21
echo -n " Validating dataset $i : "
15
22
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 "
18
25
continue
19
26
fi
20
27
@@ -23,18 +30,18 @@ for i in $(ls -d */ | grep -v node_modules); do
23
30
CMD=" bids-validator ${i%%/ } $VALIDATOR_ARGS "
24
31
25
32
# Use default configuration unless overridden
26
- if [[ ! ( -f ${i%%/ } /.bids-validator-config.json || $CMD =~ /--config/ ) ]]; then
33
+ if [[ ! ( -f " ${i%%/ } /.bids-validator-config.json" || $CMD =~ /--config/ ) ]]; then
27
34
CMD=" $CMD --config $PWD /${VARIANT} config.json"
28
35
fi
29
36
30
37
# Ignore NIfTI headers except for synthetic dataset
31
- if [ $i != " synthetic/" ]; then
38
+ if [ " $i " != " synthetic/" ]; then
32
39
CMD=" $CMD --ignoreNiftiHeaders"
33
40
else
34
41
echo " validating NIfTI headers. "
35
42
fi
36
43
37
- echo " Running " $CMD
44
+ echo " Running $CMD "
38
45
39
46
$CMD || failed+=" $i "
40
47
done
You can’t perform that action at this time.
0 commit comments