From 65b93c9b7ead618192dbcc5ab4fcdda29edd1eff Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Fri, 10 Nov 2023 13:56:23 +0100 Subject: [PATCH] Extending setup.py by installing SSH deploy keys --- setup.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/setup.py b/setup.py index 1cf7587..e306f81 100644 --- a/setup.py +++ b/setup.py @@ -28,6 +28,7 @@ __lib_dir__ = os.path.join(__base_dir__, 'lib') __module_dir__ = os.path.join(__lib_dir__, 'cr_tf') __init_py__ = os.path.join(__module_dir__, '__init__.py') __postinst_scriptdir__ = pathlib.Path(__base_dir__) / 'postinstall-scripts' +__keys_dir__ = pathlib.Path(__base_dir__) / 'keys' PATHS = { '__base_dir__': __base_dir__, @@ -152,6 +153,14 @@ for f in __postinst_scriptdir__.glob('*'): if __pi_scripts__: __data_files__.append(('postinstall-scripts', __pi_scripts__)) +__keys__ = [] +for f in __keys_dir__.glob('*'): + if f.is_file() and os.access(str(f), os.R_OK): + relpath = os.path.relpath(str(f), __base_dir__) + __keys__.append(relpath) +if __keys__: + __data_files__.append(('keys', __keys__)) + # print("Found data files:\n" + pp(__data_files__) + "\n") -- 2.39.5