#!/bin/bash

cd "$(dirname "$0")/compiler" || exit 1

CONFIG_FILE="$(pwd)/arduino-cli.yaml"
PLATFORM_PATH="packages/Elron"

rm -rf "$PLATFORM_PATH"
./arduino-cli --config-file "$CONFIG_FILE" core update-index
./arduino-cli --config-file "$CONFIG_FILE" core install Elron:MIK32_Amur

echo "Update done"