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