diff options
author | Johannes Graumann <johannes_graumann@web.de> | 2012-10-15 22:41:34 +0300 |
---|---|---|
committer | Johannes Graumann <johannes_graumann@web.de> | 2012-10-15 22:41:34 +0300 |
commit | 87a93c748fb5b1591a9e26e6cd377e22f54706d0 (patch) | |
tree | 68cc7686632682d9876740ae0f00474a41573769 /pykolab | |
parent | 9f4d66dfe7a0eb9e059433372d3b3b8ebfc55155 (diff) | |
download | pykolab-87a93c748fb5b1591a9e26e6cd377e22f54706d0.tar.gz |
Debianize: Adapt to Debians use of roundcube rather than roundcubemail;
Diffstat (limited to 'pykolab')
-rw-r--r-- | pykolab/setup/setup_roundcube.py | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/pykolab/setup/setup_roundcube.py b/pykolab/setup/setup_roundcube.py index 4a5b394..e242e04 100644 --- a/pykolab/setup/setup_roundcube.py +++ b/pykolab/setup/setup_roundcube.py @@ -119,14 +119,13 @@ def execute(*args, **kw): t = Template(template_definition, searchList=[rc_settings]) log.debug( - _("Successfully compiled template %r, writing out to %r") % ( - template_file, - '/etc/roundcubemail/%s' % (want_file) - ), + _("Successfully compiled template %r, writing out to %r") % (template_file, want_file), level=8 ) - - fp = open('/etc/roundcubemail/%s' % (want_file), 'w') + if os.path.isdir('/etc/roundcubemail'): + fp = open('/etc/roundcubemail/%s' % (want_file), 'w') + elif os.path.isdir('/etc/roundcube'): + fp = open('/etc/roundcube/%s' % (want_file), 'w') fp.write(t.__str__()) fp.close() @@ -143,14 +142,18 @@ def execute(*args, **kw): if not schema_filepath in schema_files: schema_files.append(schema_filepath) - for root, directories, filenames in os.walk('/usr/share/roundcubemail/plugins/calendar/drivers/kolab/'): + if os.path.isdir('/usr/share/roundcubemail'): + rcpath = '/usr/share/roundcubemail/' + elif os.path.isdir('/usr/share/roundcube'): + rcpath = '/usr/share/roundcube/' + for root, directories, filenames in os.walk(rcpath + 'plugins/calendar/drivers/kolab/'): for filename in filenames: if filename.startswith('mysql') and filename.endswith('.sql'): schema_filepath = os.path.join(root,filename) if not schema_filepath in schema_files: schema_files.append(schema_filepath) - for root, directories, filenames in os.walk('/usr/share/roundcubemail/plugins/libkolab/'): + for root, directories, filenames in os.walk(rcpath + 'plugins/libkolab/'): for filename in filenames: if filename.startswith('mysql') and filename.endswith('.sql'): schema_filepath = os.path.join(root,filename) |