From 50be00d01dc7f3ed3cfb36501d2c7658d394fd24 Mon Sep 17 00:00:00 2001 From: lgromero Date: Wed, 29 May 2024 11:04:13 +0200 Subject: [PATCH] refs #401 adds glob function to cloning engine --- installer/ogboot_installer.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/installer/ogboot_installer.py b/installer/ogboot_installer.py index 6db30c7..b470ce9 100755 --- a/installer/ogboot_installer.py +++ b/installer/ogboot_installer.py @@ -590,11 +590,15 @@ def copyClientFiles(): errstatus = 1 echoAndLog(f"{copyClientFiles.__name__}(): Copying OpenGnsys Cloning Engine files.") - subprocess.run(["mkdir", "-p", f"{INSTALL_TARGET}/client/lib/engine/bin"]) - cp_engine_process = subprocess.run(["cp", "-a", f"{WORKDIR}/ogboot/client/engine/*.lib*", f"{INSTALL_TARGET}/client/lib/engine/bin"]) - if cp_engine_process.returncode != 0: - errorAndLog(f"{copyClientFiles.__name__}(): error while copying engine files") - errstatus = 1 + + engine_files = glob.glob(f"{WORKDIR}/ogboot/client/engine/*.lib*") + + # Copiar cada archivo individualmente + for file in engine_files: + cp_engine_process = subprocess.run(["cp", "-a", file, f"{INSTALL_TARGET}/client/lib/engine/bin"]) + if cp_engine_process.returncode != 0: + errorAndLog(f"{copyClientFiles.__name__}(): error while copying engine files: {file}") + errstatus = 1 if errstatus == 0: echoAndLog(f"{copyClientFiles.__name__}(): client copy files success.") @@ -603,7 +607,6 @@ def copyClientFiles(): return errstatus - # Configuración básica de servicios de OpenGnsys def cidr2mask(bits):