refs #404 Fix swagger copy paste files to public

ogboot_installer
Luis Gerardo Romero Garcia 2024-05-29 16:33:09 +02:00
parent cdd19d6e65
commit 26dd204fdc
1 changed files with 3 additions and 4 deletions

View File

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