From c0407638e80dddb189fb0bb7195fe1c56cfbe428 Mon Sep 17 00:00:00 2001 From: lgromero Date: Wed, 29 May 2024 10:52:25 +0200 Subject: [PATCH] refs #401 test glob glob function to use * in files --- installer/ogboot_installer.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/installer/ogboot_installer.py b/installer/ogboot_installer.py index 92f41e6..a85d361 100755 --- a/installer/ogboot_installer.py +++ b/installer/ogboot_installer.py @@ -580,10 +580,14 @@ def copyClientFiles(): errstatus = 0 echoAndLog(f"{copyClientFiles.__name__}(): Copying OpenGnsys Client files.") - cp_process = subprocess.run(["cp", "-a", f"{WORKDIR}/ogboot/client/shared/*", f"{INSTALL_TARGET}/client"]) - if cp_process.returncode != 0: - errorAndLog(f"{copyClientFiles.__name__}(): error while copying client structure") - errstatus = 1 + source_files = glob.glob(f"{WORKDIR}/ogboot/client/shared/*") + + # Copy each file individually + for file in source_files: + cp_process = subprocess.run(["cp", "-a", file, f"{INSTALL_TARGET}/client"]) + if cp_process.returncode != 0: + errorAndLog(f"{copyClientFiles.__name__}(): error while copying client structure: {file}") + errstatus = 1 echoAndLog(f"{copyClientFiles.__name__}(): Copying OpenGnsys Cloning Engine files.") subprocess.run(["mkdir", "-p", f"{INSTALL_TARGET}/client/lib/engine/bin"])