Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Start GRC (GNU Radio Companion) from built source
#!/usr/bin/env sh
set -o errexit # Exit on most errors (see the manual)
set -o errtrace # Make sure any error trap is inherited
set -o nounset # Disallow expansion of unset variables
set -o pipefail # Use last non-zero exit code in a pipeline
set -o xtrace # Trace the execution of the script (debug)
BUILD_DIR=''
if [ "$(basename "${PWD}")" == "build" ]; then
echo "In build dir"
BUILD_DIR="${PWD}"
else
echo "Not in build dir"
exit 1
fi
export PATH="${BUILD_DIR}/apps${PATH:+:$PATH}"
export LD_LIBRARY_PATH="${BUILD_DIR}/swig${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
# TODO: symlink python dir to named dir to get module lookup and export
export PYTHONPATH="${BUILD_DIR}/swig:${BUILD_DIR}${PYTHONPATH:+:$PYTHONPATH}"
export GRC_BLOCKS_PATH="${BUILD_DIR}/../grc${GRC_BLOCKS_PATH:+:$GRC_BLOCKS_PATH}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.