#!/bin/bash
IPADDR=$1
echo "-------------------------------------------------------------------------"
echo "Setting up TOF"
echo ""
# Tar up the files
echo "Copying files for ptp4l"
echo ""
tar -czvf yeti_setup.tar.gz yeti_setup/
echo ""
echo "*******************"
echo "password is 'root'"
echo "*******************"
ssh-keygen -f ~/.ssh/known_hosts -R ${IPADDR}
scp yeti_setup.tar.gz root@${IPADDR}:~
rm yeti_setup.tar.gz
echo ""
echo "Building ptp4l"
echo ""
ssh root@${IPADDR} "tar -xvzf yeti_setup.tar.gz; cd yeti_setup/; ./install.sh;"
echo ""
echo "Finished!"
