Skip to content

Instantly share code, notes, and snippets.

@largerock
Created March 23, 2022 05:28
Show Gist options
  • Save largerock/34c0d495d243e6da1f3949fedfab3eac to your computer and use it in GitHub Desktop.
Save largerock/34c0d495d243e6da1f3949fedfab3eac to your computer and use it in GitHub Desktop.
Installs libdatachannel lib and header files to the /usr/local/* directories for c++ apps to use
#!/bin/bash
if (( $EUID != 0 )); then
echo "Please run as root"
exit
fi
cd /tmp
git clone https://github.com/paullouisageneau/libdatachannel.git && cd libdatachannel
git submodule update --init --recursive --depth 1
cmake -B build -DUSE_GNUTLS=1 -DUSE_NICE=0
cd build
make -j2
make install
rm -rf /tmp/libdatachannel
echo "libdatachannel installed"
@largerock
Copy link
Author

Run script as sudo using /bin/bash -c "$(curl -fsSL https://gist.githubusercontent.com/largerock/34c0d495d243e6da1f3949fedfab3eac/raw/fdad742840320a8974af433b44708e7aacbf1911/install_libdatachannel.sh)"

@largerock
Copy link
Author

largerock commented May 6, 2022

requires gnutls-dev to be installed on macOS (and probably windows)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment