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:
authorKlaas Freitag <freitag@owncloud.com>2015-01-12 16:48:11 +0300
committerKlaas Freitag <freitag@owncloud.com>2015-01-12 16:49:22 +0300
commit89eb4727b4ecaa5807ef1a9e05759fe9edfdfd81 (patch)
tree21cf77952a342911dca3237d48b45f9cb7ece202 /shell_integration
parent5619947685a999a7999f5f5bc8ee6c1e28c676db (diff)
Nautilus overlays: Add a script to patch the branding name into pyhton script.
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