#!/usr/bin/env python
import os
import sys
import rospkg.stack

if os.path.exists('./stack.xml'):
    stack = rospkg.stack.parse_stack_file('./stack.xml')
    print stack.version
else:
    print >> sys.stderr, 'This doesn\'t appear to be a catkin stack.\n\tMake sure you are in a directory with a stack.xml.'
    sys.exit(1)
