#!/usr/bin/env bash
set -eu

# Variables
GCC_COMMAND=arm-none-eabi-gcc

: "install $GCC_COMMAND" && {
  if type $GCC_COMMAND > /dev/null 2>&1; then
    echo "$GCC_COMMAND already exists. skip install."
  else
    sudo apt-get update
    sudo apt-get install -y gcc-arm-none-eabi
  fi
}

exit 0
