Skip to content

Instantly share code, notes, and snippets.

@jbohren
Forked from mmedvede/cm
Created March 3, 2014 04:31
Show Gist options
  • Save jbohren/9318395 to your computer and use it in GitHub Desktop.
Save jbohren/9318395 to your computer and use it in GitHub Desktop.
#!/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