refs #401 fix subprocess returncode problem in some functions and adds ogboot/client directoriy creation
parent
e275dcb6a4
commit
f9b4e3eee9
|
@ -365,6 +365,7 @@ def createDirs(INSTALL_TARGET):
|
|||
if not os.path.exists(INSTALL_TARGET):
|
||||
try:
|
||||
os.makedirs(INSTALL_TARGET)
|
||||
os.makedirs(os.path.join(INSTALL_TARGET, "client")) # Create INSTALL_TARGET/client directory
|
||||
except OSError:
|
||||
errorAndLog("Error while creating directory paths!")
|
||||
exit(1)
|
||||
|
@ -553,9 +554,9 @@ def servicesCompilation():
|
|||
|
||||
# Compilar OpenGnsys Client
|
||||
echoAndLog(f"{servicesCompilation.__name__}(): Compiling OpenGnsys Admin Client")
|
||||
subprocess.run(["make"], cwd=f"{WORKDIR}/ogboot/sources/clients/ogAdmClient")
|
||||
process = subprocess.run(["make"], cwd=f"{WORKDIR}/ogboot/sources/clients/ogAdmClient")
|
||||
subprocess.run(["mv", f"{WORKDIR}/ogboot/sources/clients/ogAdmClient/ogAdmClient", f"{WORKDIR}/ogboot/client/shared/bin"])
|
||||
if subprocess.returncode != 0:
|
||||
if process.returncode != 0:
|
||||
echoAndLog(f"{servicesCompilation.__name__}(): error while compiling OpenGnsys Admin Client")
|
||||
hayErrores = 1
|
||||
|
||||
|
@ -567,8 +568,8 @@ def copyInterfaceAdm():
|
|||
|
||||
# Crear carpeta y copiar Interface
|
||||
echoAndLog(f"{copyInterfaceAdm.__name__}(): Copying Administration Interface Folder")
|
||||
subprocess.run(["cp", "-ar", f"{WORKDIR}/ogboot/sources/interface", f"{INSTALL_TARGET}/client/interfaceAdm"])
|
||||
if subprocess.returncode != 0:
|
||||
cp_process = subprocess.run(["cp", "-ar", f"{WORKDIR}/ogboot/sources/interface", f"{INSTALL_TARGET}/client/interfaceAdm"])
|
||||
if cp_process.returncode != 0:
|
||||
echoAndLog(f"{copyInterfaceAdm.__name__}(): error while copying Administration Interface Folder")
|
||||
hayErrores = 1
|
||||
|
||||
|
@ -579,15 +580,15 @@ def copyClientFiles():
|
|||
errstatus = 0
|
||||
|
||||
echoAndLog(f"{copyClientFiles.__name__}(): Copying OpenGnsys Client files.")
|
||||
subprocess.run(["cp", "-a", f"{WORKDIR}/ogboot/client/shared/*", f"{INSTALL_TARGET}/client"])
|
||||
if subprocess.returncode != 0:
|
||||
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
|
||||
|
||||
echoAndLog(f"{copyClientFiles.__name__}(): Copying OpenGnsys Cloning Engine files.")
|
||||
subprocess.run(["mkdir", "-p", f"{INSTALL_TARGET}/client/lib/engine/bin"])
|
||||
subprocess.run(["cp", "-a", f"{WORKDIR}/ogboot/client/engine/*.lib*", f"{INSTALL_TARGET}/client/lib/engine/bin"])
|
||||
if subprocess.returncode != 0:
|
||||
cp_engine_process = subprocess.run(["cp", "-a", f"{WORKDIR}/ogboot/client/engine/*.lib*", f"{INSTALL_TARGET}/client/lib/engine/bin"])
|
||||
if cp_engine_process.returncode != 0:
|
||||
errorAndLog(f"{copyClientFiles.__name__}(): error while copying engine files")
|
||||
errstatus = 1
|
||||
|
||||
|
|
Loading…
Reference in New Issue