From 26dd204fdc92bd2e47b89d86ac4fb7147149ecf2 Mon Sep 17 00:00:00 2001 From: lgromero Date: Wed, 29 May 2024 16:33:09 +0200 Subject: [PATCH] refs #404 Fix swagger copy paste files to public --- installer/ogboot_installer.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/installer/ogboot_installer.py b/installer/ogboot_installer.py index 08e0e5d..146a87b 100755 --- a/installer/ogboot_installer.py +++ b/installer/ogboot_installer.py @@ -7,7 +7,6 @@ import platform, os, sys, subprocess, datetime, shutil, argparse, time, pwd, glob, zipfile - global UBUNTU_OS_VERSION, OPENGNGYS_VERSION, PYTHON_VERSION_LAST, PYTHON_VERSION, DEPENDENCIES2, INSTALL_OGBOOT_TARGET, WORK_DIR, LOG_FILE, CHECKPKG, INSTALLPKG, PATH, PROGRAM_DIR, OPENGNSYS_SERVER, UPDATEPKGLIST UPDATEPKGLIST = "" @@ -331,8 +330,8 @@ def install_swagger_ui(): zip_ref.extractall(swagger_ui_path) # Copia los archivos de Swagger UI al directorio de destino - shutil.copytree(os.path.join(swagger_ui_path, "swagger-ui-master", "dist"), destination_path) - + for file_path in glob.glob(os.path.join(swagger_ui_path, "swagger-ui-master", "dist", "*")): + shutil.copy(file_path, destination_path) # Elimina el archivo descargado y el directorio temporal os.remove("/tmp/swagger-ui.zip") shutil.rmtree(swagger_ui_path) @@ -413,7 +412,7 @@ def create_ogboot_project(path_opengnsys_base): os.remove(composer_lock_path) install_swagger_ui() # Instalar Swagger UI - + print("Esqueleto de la aplicación creado y archivo composer.lock eliminado.")