refs #401 test glob glob function to use * in files

pull/4/head
Luis Gerardo Romero Garcia 2024-05-29 10:52:25 +02:00
parent f9b4e3eee9
commit c0407638e8
1 changed files with 8 additions and 4 deletions

View File

@ -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"])