From e522ce29b15159efcc16e4626b43c362ce1512d5 Mon Sep 17 00:00:00 2001 From: lgromero Date: Tue, 11 Mar 2025 08:33:13 +0100 Subject: [PATCH] refs #1686 moves bin and lib outside api directory --- installer/ogboot_installer.py | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/installer/ogboot_installer.py b/installer/ogboot_installer.py index dd76b14..6eb35fe 100755 --- a/installer/ogboot_installer.py +++ b/installer/ogboot_installer.py @@ -303,21 +303,32 @@ def og_boot_copy_files(): api_dir = os.path.join(INSTALL_OGBOOT_TARGET, "api") bin_source = os.path.join(REPO_DIR, "bin") - bin_dest = os.path.join(api_dir, "bin") + bin_dest = os.path.join(INSTALL_OGBOOT_TARGET, "bin") src_source = os.path.join(REPO_DIR, "src") src_dest = os.path.join(api_dir, "src") config_source = os.path.join(REPO_DIR, "config") config_dest = os.path.join(api_dir, "config") lib_source = os.path.join(REPO_DIR, "lib") - lib_dest = os.path.join(api_dir, "lib") + lib_dest = os.path.join(INSTALL_OGBOOT_TARGET, "lib") - # Copiar directorios a api/ if os.path.exists(bin_dest): shutil.rmtree(bin_dest) shutil.copytree(bin_source, bin_dest) - # Repetir para src, config, lib... - # Crear directorio public bajo api/ + if os.path.exists(src_dest): + shutil.rmtree(src_dest) + shutil.copytree(src_source, src_dest) + + if os.path.exists(config_dest): + shutil.rmtree(config_dest) + shutil.copytree(config_source, config_dest) + + if os.path.exists(lib_dest): + shutil.rmtree(lib_dest) + shutil.copytree(lib_source, lib_dest) + + os.makedirs(os.path.join(INSTALL_OGBOOT_TARGET, "etc"), mode=0o775, exist_ok=True) + os.makedirs(os.path.join(INSTALL_OGBOOT_TARGET, "client"), mode=0o775, exist_ok=True) public_dir = os.path.join(api_dir, "public") os.makedirs(public_dir, mode=0o775, exist_ok=True)