mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-26 11:43:25 +00:00
Updates
This commit is contained in:
@@ -230,6 +230,9 @@ target_link_libraries(${PROJECT_NAME}
|
||||
${OpenCV_LIBRARIES}
|
||||
)
|
||||
|
||||
# Set Clover to default www page
|
||||
set(ROSWWW_STATIC_DEFAULT ${PROJECT_NAME})
|
||||
|
||||
#############
|
||||
## Install ##
|
||||
#############
|
||||
|
||||
@@ -19,4 +19,5 @@ catkin_install_python(PROGRAMS src/update
|
||||
message(status "CATKIN_ENV: ${CATKIN_ENV}")
|
||||
|
||||
add_custom_target(roswww_static ALL
|
||||
COMMAND ${CATKIN_ENV} ${CMAKE_CURRENT_SOURCE_DIR}/src/update)
|
||||
COMMAND ${CMAKE_COMMAND} -E env ROSWWW_STATIC_DEFAULT=${ROSWWW_STATIC_DEFAULT}
|
||||
${CATKIN_ENV} ${CMAKE_CURRENT_SOURCE_DIR}/src/update)
|
||||
|
||||
@@ -22,9 +22,11 @@ rospack = rospkg.RosPack()
|
||||
|
||||
www = rospkg.get_ros_home() + '/www'
|
||||
index_file = None # rospy.get_param('~index_file', None)
|
||||
default_package = None # rospy.get_param('~default_package', None)
|
||||
default_package = os.environ.get('ROSWWW_STATIC_DEFAULT') # rospy.get_param('~default_package', None)
|
||||
|
||||
print('roswww_static: destination directory:', www)
|
||||
print('roswww_static: default package:', default_package)
|
||||
|
||||
print('roswww_static: putting symlinks to ', www)
|
||||
shutil.rmtree(www, ignore_errors=True) # reset www directory content
|
||||
os.mkdir(www)
|
||||
|
||||
@@ -35,7 +37,7 @@ index = '<h1>Packages list</h1>\n<ul>\n'
|
||||
for name in packages:
|
||||
path = rospack.get_path(name)
|
||||
if os.path.exists(path + '/www'):
|
||||
print('roswww_static: found www path for %s package', name)
|
||||
print('roswww_static: found www path for package', name)
|
||||
os.symlink(path + '/www', www + '/' + name)
|
||||
index += '<li><a href="{name}/">{name}</a></li>'.format(name=name)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user