#!/bin/bash

# commented commands were not necessary for 1st setup, but necessary for future updates/upgrades
#arduino-cli update
#arduino-cli upgrade

# arduino-cli core update-index --additional-urls https://dl.espressif.com/dl/package_esp32_index.json
arduino-cli core update-index --config-file arduino-cli.yaml

# install core (board / platform)
arduino-cli core install esp32:esp32

# show the list of installed platforms
arduino-cli core list

# install library 
arduino-cli lib install M5StickCPlus

# Optional for IRsend samples
arduino-cli lib install IRremoteESP8266
arduino-cli lib install WiFi HttpClient
arduino-cli lib install Regexp Dictionary
arduino-cli lib install ArduinoJson
#arduino-cli lib install WiFiMulti_Generic


## You can find other libraries as follows.
# arduino-cli lib search [keyword]
## if you get too much candidates, use grep to filter 
# arduino-cli lib search [keyword] | grep -e "^Name"


# Finally, just show board list
arduino-cli board list
