Skip to content

Instantly share code, notes, and snippets.

@mmedvede
Created February 26, 2014 05:49
Show Gist options
  • Save mmedvede/9224247 to your computer and use it in GitHub Desktop.
Save mmedvede/9224247 to your computer and use it in GitHub Desktop.
Shortcut for building catkin workspace from anywhere within the workspace (ROS)
#!/usr/bin/env bash
# Use catkin_make from anywhere in a workspace.
# Ascends from current directory until a catkin workspace root is reached,
# and invokes catkin_make.
# mmedvede@cs.uml.edu
set -e
set -u
while [ ! \( -e src -a -L src/CMakeLists.txt \) -a "$(pwd)" != "/" ] ; do
cd ..
done
if [ "$(pwd)" = "/" ]; then
echo "Not in catkin workspace" 1>&2
exit 1
fi
catkin_make $*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment