#!/bin/bash help() { echo "" echo "Usage:" echo " can_update.sh board [interface]" echo " Default interface is can0" exit -1; } if [ ! -d tools ]; then echo "Please run this script from firmware directory, not tools!" help fi if [ -z $1 ]; then echo "Please provide board name as argunment" help fi IFACE=can0 if [ ! -z $1 ]; then IFACE=$2 fi if [ ! -d /sys/class/net/$IFACE ]; then echo "Interface $IFACE is not exist" help fi if [ $(