Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Installs goestools from source on Debian/Ubuntu without any prompt for deleting /usr/src/goestools
#!/bin/bash
GOESTOOLS_DIR="/usr/src/goestools"
GOESTOOLS_REPO="https://github.com/pietern/goestools.git"
BUILD_PACKAGES="apt-utils build-essential ca-certificates cmake git libairspy-dev libopencv* librtlsdr-dev pkg-config"
if [ "$EUID" -ne 0 ]
then echo "This script must be run as root!"
exit 1
fi &&
#get requisite packages
apt-get update &&
apt-get -y install --no-install-recommends $BUILD_PACKAGES &&
#build goestools
rm -rf "$GOESTOOLS_DIR"
git clone --recursive "$GOESTOOLS_REPO" "$GOESTOOLS_DIR" &&
cd "$GOESTOOLS_DIR" &&
mkdir -p build &&
cd build/ &&
cmake ../ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_GOESRECV=ON -DBUILD_GOESLRIT=ON -DBUILD_GOESPROC=ON &&
make -j4 &&
make install &&
cd ../ &&
mkdir -p bin &&
cd bin/ &&
cp "$GOESTOOLS_DIR"/build/src/goeslrit/goeslrit . &&
cp "$GOESTOOLS_DIR"/build/src/goesproc/goesproc . &&
cp "$GOESTOOLS_DIR"/build/src/goesrecv/goesrecv . &&
chmod +x * &&
cp "$GOESTOOLS_DIR"/etc/* . &&
echo "Done!" &&
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment