Last active
October 23, 2017 23:18
-
-
Save Mladia/cd032911e710bb107d82e168e8431517 to your computer and use it in GitHub Desktop.
send and run a lejos program
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
brick_host='192.168.0.104' | |
brick_user='root' | |
brick_home='/home/root' | |
brick_debug_port='4000' | |
project_jar='Main.jar' | |
project_main='Main' | |
if ! [ -e $project_jar ] ; | |
then | |
echo "No $project_jar in directory "$(pwd) | |
exit | |
fi | |
echo scp ./$project_jar "$brick_user@$brick_host:$brick_home" | |
scp ./$project_jar "$brick_user@$brick_host:$brick_home" | |
if [[ $1 == 1 ]] ; #debug modus | |
then | |
run_command="jrun -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=$brick_debug_port,suspend=y -cp $brick_home/$project_jar $project_main" | |
else #normal | |
run_command="jrun -cp $brick_home/$project_jar $project_main" | |
fi | |
echo ssh "$brick_home@$brick_host" "$run_command" | |
ssh "$brick_user@$brick_host" "$run_command" | |
#ssh into brick | |
#ssh [email protected] | |
#password = "" | |
#no matching key exchange => | |
#ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 user@host | |
#https://www.openssh.com/legacy.html | |
#Running the programm | |
#https://sourceforge.net/p/lejos/wiki/Developing%20with%20leJOS%20%28old%29/ | |
#jrn -cp *.jar Main | |
#jrun -cp $project_jar $project_main | |
#jrun -jar <your jar file> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment