Mahmoud Bazzal | 69a0a24 | 2019-08-22 17:36:17 +0200 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | #******************************************************************************* |
| 3 | # Copyright (c) 2019 Dortmund University of Applied Sciences and Arts and others. |
| 4 | # |
| 5 | # This program and the accompanying materials are made |
| 6 | # available under the terms of the Eclipse Public License 2.0 |
| 7 | # which is available at https://www.eclipse.org/legal/epl-2.0/ |
| 8 | # |
| 9 | # SPDX-License-Identifier: EPL-2.0 |
| 10 | # |
| 11 | # Contributors: |
| 12 | # Dortmund University of Applied Sciences and Arts - initial API and implementation |
| 13 | #******************************************************************************* |
| 14 | echo "Parallella remote Script version 1.0" |
| 15 | echo "welcome to the world of tomorrow" |
| 16 | |
| 17 | #Board connection parameters |
| 18 | HOST_NAME=172.22.167.10 |
| 19 | HOST_USER=parallella |
| 20 | PORT=22 |
| 21 | HOST_OFFLOAD_PATH="~/boardExec" |
| 22 | |
| 23 | #SSH key file |
| 24 | KEY=~/.ssh/key |
| 25 | #path and file name inputs |
| 26 | DEPOLYMENT_BINARY=${1?Error: no host binary given} |
| 27 | |
| 28 | echo "---------------------------------------" |
| 29 | echo "Running program $HOST_BINARY" |
| 30 | echo "***************************************" |
| 31 | #run the binaries remotely on parallella |
| 32 | ssh $HOST_NAME -p$PORT -l$HOST_USER -i$KEY "EPIPHANY_HOME=/opt/adapteva/esdk && . $EPIPHANY_HOME/setup.sh && cd $HOST_OFFLOAD_PATH && ./$DEPOLYMENT_BINARY" |
| 33 | echo "***************************************" |
| 34 | echo "done" |