Adjusted exit in case of error

This commit is contained in:
Patrick Lipka 2022-09-18 21:01:30 +02:00
parent 48ccbe766b
commit eb719c0457
1 changed files with 4 additions and 4 deletions

View File

@ -155,7 +155,7 @@ def installLib(lib,srcDir,workDir,instDir,compCC,compCXX,compFC,buildThreads,ver
if (err != 0): if (err != 0):
print("Error: Download of "+libName+" v."+libVersion+" failed!") print("Error: Download of "+libName+" v."+libVersion+" failed!")
print("See "+logfilePath+" for details") print("See "+logfilePath+" for details")
exit sys.exit(0)
# configure library # configure library
os.chdir(workDir) os.chdir(workDir)
if (os.path.exists(workDir+"/"+libName+"-"+libVersion)): if (os.path.exists(workDir+"/"+libName+"-"+libVersion)):
@ -173,7 +173,7 @@ def installLib(lib,srcDir,workDir,instDir,compCC,compCXX,compFC,buildThreads,ver
if (err != 0): if (err != 0):
print("Error: Configuring of "+libName+" v."+libVersion+" failed!") print("Error: Configuring of "+libName+" v."+libVersion+" failed!")
print("See "+logfilePath+" for details") print("See "+logfilePath+" for details")
exit sys.exit(1)
# build library # build library
#buildCommand = lib['build'].replace("$CC",compCC).replace("$CXX",compCXX).replace("$FC",compFC).replace("$INSTALL",instDir).replace("$BUILDTHREADS",buildThreads).split() #buildCommand = lib['build'].replace("$CC",compCC).replace("$CXX",compCXX).replace("$FC",compFC).replace("$INSTALL",instDir).replace("$BUILDTHREADS",buildThreads).split()
@ -203,7 +203,7 @@ def installLib(lib,srcDir,workDir,instDir,compCC,compCXX,compFC,buildThreads,ver
if (err != 0): if (err != 0):
print("Error: Building "+libName+" v."+libVersion+" failed!") print("Error: Building "+libName+" v."+libVersion+" failed!")
print("See "+logfilePath+" for details") print("See "+logfilePath+" for details")
exit sys.exit(1)
#install library #install library
installCommand = lib['install'].replace("$BUILDTHREADS",buildThreads) installCommand = lib['install'].replace("$BUILDTHREADS",buildThreads)
@ -215,7 +215,7 @@ def installLib(lib,srcDir,workDir,instDir,compCC,compCXX,compFC,buildThreads,ver
if (err != 0): if (err != 0):
print("Error: Installing "+libName+" v."+libVersion+" failed!") print("Error: Installing "+libName+" v."+libVersion+" failed!")
print("See "+logfilePath+" for details") print("See "+logfilePath+" for details")
exit sys.exit(1)
print("Library "+libName+" has been installed successfully!\n") print("Library "+libName+" has been installed successfully!\n")