Snippets Collections
command -v STM32_Programmer_CLI >/dev/null 2>&1 || { echo >&2 "Need to add STM32_Programmer_CLI to the enviorenment path. Aborting..."; exit 1; }
file="$1"

if [[ $file =~ \.bin$ ]] || [[ $file =~ \.hex$ ]]; then
    echo "OK" >&2
else
    echo "NOT OK" >&2
    exit 2
fi
if [ "$#" -ne 1 ]; then
  echo "Usage: $0 Path to binary file" >&2
  exit 1
fi
star

Wed Jun 09 2021 10:26:20 GMT+0000 (Coordinated Universal Time)

#linux #shell-script
star

Wed Jun 09 2021 10:16:48 GMT+0000 (Coordinated Universal Time)

#linux #shell-script
star

Wed Jun 09 2021 08:41:11 GMT+0000 (Coordinated Universal Time)

#linux #shell-script

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension