Go to the documentation of this file.00001 from __future__ import print_function
00002 import argparse
00003 import os
00004 import stat
00005 import sys
00006
00007
00008 if os.path.exists(os.path.join('/opt/ros/hydro/share/catkin/cmake', 'catkinConfig.cmake.in')):
00009 sys.path.insert(0, os.path.join('/opt/ros/hydro/share/catkin/cmake', '..', 'python'))
00010 try:
00011 from catkin.environment_cache import generate_environment_script
00012 except ImportError:
00013
00014 for workspace in "/home/robbie/homer/catkin_ws/devel;/opt/ros/hydro".split(';'):
00015 python_path = os.path.join(workspace, 'lib/python2.7/dist-packages')
00016 if os.path.isdir(os.path.join(python_path, 'catkin')):
00017 sys.path.insert(0, python_path)
00018 break
00019 from catkin.environment_cache import generate_environment_script
00020
00021 code = generate_environment_script('/home/robbie/homer/catkin_ws/src/vision/object_recognition/or_libs/devel/env.sh')
00022
00023 output_filename = '/home/robbie/homer/catkin_ws/src/vision/object_recognition/or_libs/catkin_generated/setup_cached.sh'
00024 with open(output_filename, 'w') as f:
00025
00026 f.write('\n'.join(code))
00027
00028 mode = os.stat(output_filename).st_mode
00029 os.chmod(output_filename, mode | stat.S_IXUSR)