File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,9 @@ if ! command -v shellcheck > /dev/null; then
35
35
exit $EXIT_CODE
36
36
fi
37
37
38
+ SHELLCHECK_CMD=(shellcheck --external-sources --check-sourced)
38
39
EXCLUDE=" --exclude=$( IFS=' ,' ; echo " ${disabled[*]} " ) "
39
- if ! shellcheck " $EXCLUDE " $( git ls-files -- ' *.sh' | grep -vE ' src/(leveldb|secp256k1|univalue)/' ) ; then
40
+ if ! " ${SHELLCHECK_CMD[@]} " " $EXCLUDE " $( git ls-files -- ' *.sh' | grep -vE ' src/(leveldb|secp256k1|univalue)/' ) ; then
40
41
EXIT_CODE=1
41
42
fi
42
43
@@ -46,14 +47,13 @@ if ! command -v yq > /dev/null; then
46
47
fi
47
48
48
49
EXCLUDE_GITIAN=${EXCLUDE} " ,$( IFS=' ,' ; echo " ${disabled_gitian[*]} " ) "
49
- SHELLCHECK_CMD=" shellcheck --external-sources --check-sourced $EXCLUDE_GITIAN "
50
50
for descriptor in $( git ls-files -- ' contrib/gitian-descriptors/*.yml' )
51
51
do
52
52
script=$( basename " $descriptor " )
53
53
# Use #!/bin/bash as gitian-builder/bin/gbuild does to complete a script.
54
54
echo " #!/bin/bash" > $script
55
55
yq -r .script " $descriptor " >> $script
56
- if ! $ SHELLCHECK_CMD $script ; then
56
+ if ! " ${ SHELLCHECK_CMD[@]} " " $EXCLUDE_GITIAN " $script ; then
57
57
EXIT_CODE=1
58
58
fi
59
59
rm $script
You can’t perform that action at this time.
0 commit comments