Skip to content

Instantly share code, notes, and snippets.

@cdellin
Created January 29, 2015 04:55
Show Gist options
  • Save cdellin/d95d35184d7c68632128 to your computer and use it in GitHub Desktop.
Save cdellin/d95d35184d7c68632128 to your computer and use it in GitHub Desktop.
#!/bin/sh
# 2015-01-12 Chris Dellin <[email protected]>
# example catkin environment hook to manage the OPENRAVE_DATA path
# on a per-package basis
# determine if we're in the devel or install space
if [ "@DEVELSPACE@" = "True" -o "@DEVELSPACE@" = "true" ]
then
DATA=@CMAKE_CURRENT_SOURCE_DIR@/ordata
else
DATA=@CMAKE_INSTALL_PREFIX@/share/openrave-@OpenRAVE_LIBRARY_SUFFIX@
fi
# append to paths (if not already there)
# from http://unix.stackexchange.com/a/124447
case ":${OPENRAVE_DATA:=$DATA}:" in
*:$DATA:*) ;;
*) OPENRAVE_DATA="$OPENRAVE_DATA:$DATA" ;;
esac
export OPENRAVE_DATA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment