Minor improvements - Guard from my changes
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
This commit is contained in:
parent
ee51c1cc91
commit
57285db4ff
27
op-test.sh
27
op-test.sh
@ -4,8 +4,23 @@
|
|||||||
# and executes that - allows for disconnected testing from the easy-rsa
|
# and executes that - allows for disconnected testing from the easy-rsa
|
||||||
# repo with TravisCI.
|
# repo with TravisCI.
|
||||||
|
|
||||||
|
verb='-v'
|
||||||
|
enable_shellcheck=1
|
||||||
|
|
||||||
|
while [ -n "$1" ]; do
|
||||||
|
case "$1" in
|
||||||
|
-v) verb='-v' ;;
|
||||||
|
-vv) verb='-vv' ;;
|
||||||
|
-scoff) unset -v enable_shellcheck ;;
|
||||||
|
*) verb='-v'
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
github_url='https://raw.githubusercontent.com'
|
github_url='https://raw.githubusercontent.com'
|
||||||
|
|
||||||
|
if [ "$enable_shellcheck" ]; then
|
||||||
|
|
||||||
if [ -e "shellcheck" ] && [ "$EASYRSA_NIX" ]; then
|
if [ -e "shellcheck" ] && [ "$EASYRSA_NIX" ]; then
|
||||||
chmod +x shellcheck
|
chmod +x shellcheck
|
||||||
./shellcheck -V
|
./shellcheck -V
|
||||||
@ -28,17 +43,17 @@ elif [ "$EASYRSA_NIX" ]; then
|
|||||||
rm -f ./shellcheck
|
rm -f ./shellcheck
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "$1" in
|
else
|
||||||
-v) verb='-v' ;;
|
# shellcheck is disabled
|
||||||
-vv) verb='-vv' ;;
|
:
|
||||||
*) verb='-v'
|
fi
|
||||||
esac
|
|
||||||
|
|
||||||
estat=0
|
estat=0
|
||||||
|
|
||||||
if [ -e "easyrsa-unit-tests.sh" ]; then
|
if [ -e "easyrsa-unit-tests.sh" ]; then
|
||||||
if sh easyrsa-unit-tests.sh "$verb"; then
|
if sh easyrsa-unit-tests.sh "$verb"; then
|
||||||
if [ "$EASYRSA_NIX" ]; then
|
if [ "$EASYRSA_NIX" ] && [ "$EASYRSA_BY_TINCANTECH" ]; then
|
||||||
sh easyrsa-unit-tests.sh "$verb" -x || estat=2
|
sh easyrsa-unit-tests.sh "$verb" -x || estat=2
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user