Skip to content

Instantly share code, notes, and snippets.

@ahogen
Last active August 2, 2017 21:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahogen/6a8614d51dd56fe5066c7e686a68d7c7 to your computer and use it in GitHub Desktop.
Save ahogen/6a8614d51dd56fe5066c7e686a68d7c7 to your computer and use it in GitHub Desktop.
Download and build the AVB/TSN controller utility from Avnu Alliance (https://github.com/AVnu/avdecc-lib). Tested on Ubuntu 16.04.
#!/bin/bash
###############################################################################
# File: build_avdecc_lib.sh
# Author: Alex Hogen (@ahogen on Github)
#
# Download and build the AVB/TSN controller utility from Avnu Alliance
# (https://github.com/AVnu/avdecc-lib). Tested on Ubuntu 16.04.
###############################################################################
echo "Is the current directory where you want to download and compile avdecc-lib?"
echo $PWD
echo ""
read -p "[y/n]: " -n 1 -r
echo ""
if [[ $REPLY =~ ^[Yy]$ ]]
then
# Get dependencies
sudo apt-get update
sudo apt-get install -y git cmake gcc g++ libpcap-dev
# One of these should work
sudo apt-get install -y libreadline5
sudo apt-get install -y libreadline-dev
# Get the repository and its submodule(s)
git clone https://github.com/audioscience/avdecc-lib.git
cd avdecc-lib
git submodule update --init --recursive
# Start building
cmake .
make
echo "-----------------------------------"
echo " Running!"
echo "-----------------------------------"
cd controller/app/cmdline
# See https://stackoverflow.com/questions/28857941/opening-raw-sockets-in-linux-without-being-superuser
sudo setcap cap_net_raw+ep avdecccmdline
./avdecccmdline
else
echo "Move this script to the directory you wish to download and install in, then re-run this script"
echo "Exiting..."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment