#!/bin/bash

#####################################################
# Starter for smigengui.lm9 utility.
# smigengui is SMI Generic GUI to control SMI FSM.
#####################################################
# Copyright (c) 2023 Alexey Kuryakin daqgroup@mail.ru
#####################################################

readonly scriptfile="${BASH_SOURCE[0]}";
readonly scriptFILE="$(realpath $scriptfile)";
readonly scriptHOME="$(dirname  $scriptFILE)";
readonly gui="$scriptHOME/smigengui.lm9";

if which CrossMachine >/dev/null 2>&1; then
 if [ -e "$gui" ]; then
  </dev/null CrossMachine $gui >/dev/null 2>&1 & disown;
 else
  1>&2 echo "Error: could not find $gui";
 fi;
else
 1>&2 echo "Error: could not find CrossMachine";
fi;

