changeset 516:7eb66c7898cb prerelease

Fixed setup_ssh (got screwed by bela_common)
author Giulio Moro <giuliomoro@yahoo.it>
date Wed, 22 Jun 2016 13:34:23 +0100
parents 03b511d99f3d
children 4656f886175e
files scripts/.bela_common scripts/setup_ssh.sh
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/.bela_common	Wed Jun 22 13:22:31 2016 +0100
+++ b/scripts/.bela_common	Wed Jun 22 13:34:23 2016 +0100
@@ -1,4 +1,6 @@
-[ -z "$BBB_ADDRESS" ] && BBB_ADDRESS="root@192.168.7.2"
+[ -z "$BBB_USER" ] && BBB_USER="root"
+[ -z "$BBB_HOSTNAME" ] && BBB_HOSTNAME="192.168.7.2"
+[ -z "$BBB_ADDRESS" ] && BBB_ADDRESS="$BBB_USER@$BBB_HOSTNAME"
 [ -z "$BBB_BELA_HOME" ] && BBB_BELA_HOME="~/Bela/"
 [ -z "$BBB_SCREEN_NAME" ] && BBB_SCREEN_NAME="Bela"
 [ -z "$RUN_PROJECT" ] && RUN_PROJECT=1
--- a/scripts/setup_ssh.sh	Wed Jun 22 13:22:31 2016 +0100
+++ b/scripts/setup_ssh.sh	Wed Jun 22 13:34:23 2016 +0100
@@ -3,6 +3,7 @@
 [ -z $SCRIPTDIR ] && SCRIPTDIR="./" || SCRIPTDIR=$SCRIPTDIR/ 
 . $SCRIPTDIR.bela_common || { echo "You must be in Bela/scripts to run these scripts" | exit 1; }  
 
+[ -z $BBB_HOST ] && BBB_HOST=bbb
 CONFIG_FILENAME=$HOME/.ssh/config
 mkdir -p $HOME/.ssh # create the ssh folder if it does not exist
 printf "\nHost $BBB_HOST\nHostname $BBB_HOSTNAME\nUser $BBB_USER\nStrictHostKeyChecking=no\n\n" >> $HOME/.ssh/config