Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'shell_integration')
-rw-r--r--shell_integration/nautilus/CMakeLists.txt16
-rwxr-xr-xshell_integration/nautilus/setappname.sh6
2 files changed, 21 insertions, 1 deletions
diff --git a/shell_integration/nautilus/CMakeLists.txt b/shell_integration/nautilus/CMakeLists.txt
index 45e73cfba..249892c44 100644
--- a/shell_integration/nautilus/CMakeLists.txt
+++ b/shell_integration/nautilus/CMakeLists.txt
@@ -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)
+
+endif()
-install(FILES syncstate.py DESTINATION ${DATADIR}/nautilus-python/extensions)
diff --git a/shell_integration/nautilus/setappname.sh b/shell_integration/nautilus/setappname.sh
new file mode 100755
index 000000000..55f4c2917
--- /dev/null
+++ b/shell_integration/nautilus/setappname.sh
@@ -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