refs #1686 moves bin and lib outside api directory

pull/14/head
Luis Gerardo Romero Garcia 2025-03-11 08:33:13 +01:00
parent 14f1fb4076
commit e522ce29b1
1 changed files with 16 additions and 5 deletions

View File

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