#!/bin/bash

set -eu

export scriptPath=$(echo $0 | sed "s|^\.\./|`pwd`/../|" | sed "s|^\./|`pwd`/|")
export baseDir=$(dirname ${scriptPath})
export gtDir=$(dirname ${baseDir})
export includeDir="${baseDir}/include/"

source "${includeDir}/bhumanBase.sh"
source "${includeDir}/robotAddresses.sh"

if [ -z "${1:-""}" ]; then
  fatal "${0} needs a command to execute as argument"
fi

sendCommandToAll "/etc/init.d/naoqi start"
sendCommandToAll "/etc/init.d/bhumand start"
