#!/bin/bash lora_1_5_h_hw="-LORA-1.5\$" lora_1_5_lga_hw="MTLGA" lora_2_1_hw="-LORA-2.1\$" L15=/sbin/mts-fpga-loader-1_5 L21=/sbin/sem-fpga-loader lora_hw=$(mts-io-sysfs show lora/hw-version 2> /dev/null) if [[ $lora_hw =~ ${lora_1_5_h_hw}|^${lora_1_5_lga_hw}* ]]; then if [[ -x ${L15} ]] ; then ${L15} "$@" else echo "Is mts-id-eeprom installed properly?" echo "Missing executable ${L15}" fi elif [[ $lora_hw =~ ${lora_2_1_hw} ]]; then if [[ -x ${L21} ]] ; then ${L21} "$@" else echo "Is sem-fpga-loader installed properly?" echo "Missing executable ${L21}" fi else echo "Supported FPGA hardware not found. Exiting." exit 1 fi