#!/bin/sh
set -e

root_dir=$(dirname "$0")
root_dir=$(cd "$root_dir/.." && pwd)
if [ ! -f "$root_dir/LICENSE.txt" ]; then
	echo "Couldn't find the root dir"
	exit 1
fi

extra_args=
while [ "$#" -gt 0 ]; do
	case $1 in
	--quick-check) extra_args="$extra_args --quick-check" ;;
	*) echo "Unknown arg: $1"; exit 1 ;;
	esac
	shift
done

$root_dir/build/build-rust $extra_args
$root_dir/build/build-python $extra_args
$root_dir/build/build-js $extra_args
$root_dir/build/build-dotnet $extra_args
