Skip to content

Instantly share code, notes, and snippets.

@TheBiggerGuy
Created January 18, 2019 17:03
Show Gist options
  • Save TheBiggerGuy/3d20d5ea87ed26ac5afc69807ff6366b to your computer and use it in GitHub Desktop.
Save TheBiggerGuy/3d20d5ea87ed26ac5afc69807ff6366b to your computer and use it in GitHub Desktop.
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