db-sync-tool-kmi 2.11.9__tar.gz → 2.11.10__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of db-sync-tool-kmi might be problematic. Click here for more details.

Files changed (39) hide show
  1. {db_sync_tool_kmi-2.11.9/db_sync_tool_kmi.egg-info → db_sync_tool_kmi-2.11.10}/PKG-INFO +1 -1
  2. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/db_sync_tool/info.py +1 -1
  3. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/db_sync_tool/recipes/typo3.py +2 -12
  4. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/db_sync_tool/utility/helper.py +25 -0
  5. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10/db_sync_tool_kmi.egg-info}/PKG-INFO +1 -1
  6. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/LICENSE +0 -0
  7. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/README.md +0 -0
  8. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/db_sync_tool/__init__.py +0 -0
  9. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/db_sync_tool/__main__.py +0 -0
  10. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/db_sync_tool/database/__init__.py +0 -0
  11. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/db_sync_tool/database/process.py +0 -0
  12. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/db_sync_tool/database/utility.py +0 -0
  13. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/db_sync_tool/recipes/__init__.py +0 -0
  14. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/db_sync_tool/recipes/drupal.py +0 -0
  15. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/db_sync_tool/recipes/laravel.py +0 -0
  16. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/db_sync_tool/recipes/symfony.py +0 -0
  17. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/db_sync_tool/recipes/wordpress.py +0 -0
  18. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/db_sync_tool/remote/__init__.py +0 -0
  19. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/db_sync_tool/remote/client.py +0 -0
  20. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/db_sync_tool/remote/rsync.py +0 -0
  21. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/db_sync_tool/remote/system.py +0 -0
  22. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/db_sync_tool/remote/transfer.py +0 -0
  23. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/db_sync_tool/remote/utility.py +0 -0
  24. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/db_sync_tool/sync.py +0 -0
  25. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/db_sync_tool/utility/__init__.py +0 -0
  26. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/db_sync_tool/utility/info.py +0 -0
  27. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/db_sync_tool/utility/log.py +0 -0
  28. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/db_sync_tool/utility/mode.py +0 -0
  29. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/db_sync_tool/utility/output.py +0 -0
  30. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/db_sync_tool/utility/parser.py +0 -0
  31. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/db_sync_tool/utility/system.py +0 -0
  32. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/db_sync_tool/utility/validation.py +0 -0
  33. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/db_sync_tool_kmi.egg-info/SOURCES.txt +0 -0
  34. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/db_sync_tool_kmi.egg-info/dependency_links.txt +0 -0
  35. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/db_sync_tool_kmi.egg-info/entry_points.txt +0 -0
  36. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/db_sync_tool_kmi.egg-info/requires.txt +0 -0
  37. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/db_sync_tool_kmi.egg-info/top_level.txt +0 -0
  38. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/setup.cfg +0 -0
  39. {db_sync_tool_kmi-2.11.9 → db_sync_tool_kmi-2.11.10}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: db_sync_tool-kmi
3
- Version: 2.11.9
3
+ Version: 2.11.10
4
4
  Summary: Synchronize a database from and to host systems.
5
5
  Home-page: https://github.com/jackd248/db-sync-tool
6
6
  Author: Konrad Michalik
@@ -1,6 +1,6 @@
1
1
  """
2
2
  Info script
3
3
  """
4
- __version__ = "2.11.9"
4
+ __version__ = "2.11.10"
5
5
  __pypi_package_url__ = "https://pypi.org/pypi/db-sync-tool-kmi"
6
6
  __homepage__ = "https://github.com/jackd248/db-sync-tool"
@@ -96,12 +96,7 @@ def get_database_setting_from_additional_configuration(client, name, file):
96
96
  :param file: String
97
97
  :return:
98
98
  """
99
- return mode.run_command(
100
- helper.get_command(client, 'sed') +
101
- f' -nE "s/\'{name}\'.*=>.*\'(.*)\'.*$/\\1/p" {file}',
102
- client,
103
- True
104
- ).replace('\n', '').strip()
99
+ return helper.run_sed_command(client, f'"s/\'{name}\'.*=>.*\'(.*)\'.*$/\\1/p" {file}')
105
100
 
106
101
  def get_database_setting_from_env(client, name, file):
107
102
  """
@@ -112,9 +107,4 @@ def get_database_setting_from_env(client, name, file):
112
107
  :param file: String
113
108
  :return:
114
109
  """
115
- return mode.run_command(
116
- helper.get_command(client, 'sed') +
117
- f' -nE "s/{name}=(.*).*$/\\1/p" {file}',
118
- client,
119
- True
120
- ).replace('\n', '').strip()
110
+ return helper.run_sed_command(client, f'"s/{name}=(.*).*$/\\1/p" {file}')
@@ -351,3 +351,28 @@ def remove_surrounding_quotes(s):
351
351
  elif s.startswith("'") and s.endswith("'"):
352
352
  return s[1:-1]
353
353
  return s
354
+
355
+
356
+ def run_sed_command(client, command):
357
+ """
358
+ Executes a sed command on the specified client, trying -E first and falling back to -r if -E fails.
359
+
360
+ :param client: The client on which the sed command should be executed.
361
+ :param command: The sed command to execute (excluding the sed options).
362
+ :return: The result of the sed command as a cleaned string (with newlines removed).
363
+ """
364
+ # Check if the client supports -E or -r option for sed
365
+ option = mode.run_command(
366
+ f"echo | {get_command(client, 'sed')} -E '' >/dev/null 2>&1 && echo -E || (echo | {get_command(client, 'sed')} -r '' >/dev/null 2>&1 && echo -r)",
367
+ client,
368
+ True
369
+ )
370
+ # If neither option is supported, default to -E
371
+ if option == '':
372
+ option = '-E'
373
+
374
+ return mode.run_command(
375
+ f"{get_command(client, 'sed')} -n {option} {command}",
376
+ client,
377
+ True
378
+ ).strip().replace('\n', '')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: db_sync_tool-kmi
3
- Version: 2.11.9
3
+ Version: 2.11.10
4
4
  Summary: Synchronize a database from and to host systems.
5
5
  Home-page: https://github.com/jackd248/db-sync-tool
6
6
  Author: Konrad Michalik