#!/usr/bin/env sh


# Get script directory
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"

sh "$SCRIPT_DIR/check-large-files" || exit 1

echo ""
echo "Running checks..."

sh "$SCRIPT_DIR/check-go" &
PID_GO=$!

sh "$SCRIPT_DIR/check-go-test" &
PID_GO_TEST=$!

sh "$SCRIPT_DIR/check-web" &
PID_WEB=$!

FAIL=0

wait "$PID_GO" || FAIL=1
wait "$PID_GO_TEST" || FAIL=1
wait "$PID_WEB" || FAIL=1

[ "$FAIL" -eq 0 ] || exit 1
