Minor improvements - Guard from my changes

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
This commit is contained in:
Richard T Bonhomme 2022-04-05 00:59:48 +01:00
parent ee51c1cc91
commit 57285db4ff
No known key found for this signature in database
GPG Key ID: 2D767DB92FB6C246

View File

@ -4,8 +4,23 @@
# and executes that - allows for disconnected testing from the easy-rsa
# 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'
if [ "$enable_shellcheck" ]; then
if [ -e "shellcheck" ] && [ "$EASYRSA_NIX" ]; then
chmod +x shellcheck
./shellcheck -V
@ -28,17 +43,17 @@ elif [ "$EASYRSA_NIX" ]; then
rm -f ./shellcheck
fi
case "$1" in
-v) verb='-v' ;;
-vv) verb='-vv' ;;
*) verb='-v'
esac
else
# shellcheck is disabled
:
fi
estat=0
if [ -e "easyrsa-unit-tests.sh" ]; 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
fi
else