Skip to content

Commit

Permalink
chore: fix run script
Browse files Browse the repository at this point in the history
  • Loading branch information
thalesmg committed Mar 25, 2024
1 parent 10222a9 commit db72dff
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,22 @@ for dict in /dicts/*.txt; do
cat "$dict" >> org/languagetool/resource/en/hunspell/spelling.txt
done

ARGS="$*"
SCHEMA_FILE=""
MAX_CONCURRENCY="10"
while [ "$#" -gt 0 ]; do
case "$1" in
-j)
MAX_CONCURRENCY="$2"
shift 2
;;
*)
SCHEMA_FILE="$1"
shift
;;
esac
done

if [ -z "${ARGS}" ]; then
if [ -z "${SCHEMA_FILE}" ]; then
echo "Missing schema file"
exit 1
fi
Expand All @@ -30,6 +43,6 @@ while ! curl --fail --data "language=en-US&text=a simple test" http://localhost:
sleep 1
done

echo "Checking $ARGS..."
echo "Checking $SCHEMA_FILE with $MAX_CONCURRENCY processes..."

emqx_schema_validate "$ARGS"
emqx_schema_validate -j "$MAX_CONCURRENCY" "$SCHEMA_FILE"

0 comments on commit db72dff

Please sign in to comment.