]> rtime.felk.cvut.cz Git - socketcan-simulink.git/blob - demo/canopen_2j_arm/run_model.sh
Run model script uses local target-ssh-key only if it is present.
[socketcan-simulink.git] / demo / canopen_2j_arm / run_model.sh
1 #!/bin/sh
2
3 if [ -n "$2" ] ; then
4
5   if [ -e target-ssh-key ] ; then
6     SSH_LOCAL_KEY_OPT="-i target-ssh-key"
7   fi
8
9   xterm -e "scp $SSH_LOCAL_KEY_OPT ./$1 canopen_2j_arm_setup root@$2:/tmp ; echo CAN setup ; ssh $SSH_LOCAL_KEY_OPT root@$2 /tmp/canopen_2j_arm_setup ; echo model $1 copied to target is run ; ssh  $SSH_LOCAL_KEY_OPT root@$2 /tmp/$1 -tf inf -w ; sleep 2" &
10
11 else
12
13   xterm -e "./$1 -tf inf -w ; sleep 2" &
14
15 fi