Last active
August 2, 2017 21:22
-
-
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.
This file contains 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 | |
############################################################################### | |
# 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