From 18ae8e736c20e06dd0b9e1355586d90bb3fdadf8 Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Fri, 24 Jan 2020 14:20:35 +0100 Subject: [PATCH] Improved build scripts --- libraries/build.sh | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/libraries/build.sh b/libraries/build.sh index a2e2274..04c0e92 100755 --- a/libraries/build.sh +++ b/libraries/build.sh @@ -24,22 +24,6 @@ source ${build_helper_file} begin_task "build_third_party" "Building libraries" -function exec_script() { - name=$(echo "$1" | sed -n -E 's:^build_(.*)\.sh:\1:p') - begin_task "build_$name" "Building $name" - - echo -e "Building library with script $color_green${1}$color_normal" - ./${1} - if [[ $? -ne 0 ]]; then - echo "Failed to build library $name. Status code: $?" - exit 1 - fi - - #Log the result - end_task "build_$name" "Finished $name" - echo "" -} - function exec_script_external() { name=$(echo "$1" | sed -n -E 's:^build_(.*)\.sh:\1:p') begin_task "build_$name" "Building $name" @@ -47,8 +31,9 @@ function exec_script_external() { echo -e "Building library with script $color_green${1}$color_normal" _prefix="library_path=\"$2\" ${*:3}" eval $_prefix ./${build_helper_scripts}/"${1}" - if [[ $? -ne 0 ]]; then - echo "Failed to build library $name. Status code: $?" + code=$? + if [[ $code -ne 0 ]]; then + echo "Failed to build library $name. Status code: $code" exit 1 fi