Nautilus overlays: Add a script to patch the branding name into pyhton script.

This commit is contained in:
Klaas Freitag 2015-01-12 14:48:11 +01:00
parent 5619947685
commit 89eb4727b4
2 changed files with 21 additions and 1 deletions

View file

@ -1,2 +1,16 @@
# copy the python nautilus plugin to build dir as it is going to
# be changed.
if( UNIX AND NOT APPLE )
configure_file(syncstate.py syncstate.py COPYONLY)
# Call the setupappname.sh script to set the custom app name.
set (cmd "${CMAKE_CURRENT_SOURCE_DIR}/setappname.sh")
execute_process(COMMAND ${cmd} ${APPLICATION_SHORTNAME}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
ERROR_VARIABLE errors OUTPUT_VARIABLE out)
install(FILES syncstate.py DESTINATION ${DATADIR}/nautilus-python/extensions) install(FILES syncstate.py DESTINATION ${DATADIR}/nautilus-python/extensions)
endif()

View file

@ -0,0 +1,6 @@
#!/bin/sh
# this script replaces the line
# appname = 'ownCloud'
# with the correct branding name in the syncstate.py script
/usr/bin/sed -i.org -e 's/appname\s*=\s*'"'"'ownCloud'"'/appname = '$1'/" syncstate.py