Skip to content

Commit

Permalink
Minor improvements - Guard from my changes
Browse files Browse the repository at this point in the history
Signed-off-by: Richard T Bonhomme <[email protected]>
  • Loading branch information
TinCanTech committed Apr 4, 2022
1 parent ee51c1c commit 57285db
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions op-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 57285db

Please sign in to comment.