diff options
Diffstat (limited to 'resources/scripts/build/src/for')
-rwxr-xr-x | resources/scripts/build/src/for | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/resources/scripts/build/src/for b/resources/scripts/build/src/for index 57459952..6945b9f9 100755 --- a/resources/scripts/build/src/for +++ b/resources/scripts/build/src/for @@ -46,8 +46,14 @@ main() [ -z "${project}" ] && err "project name not specified" [ "${project}" = "ich9utils" ] && project="util/ich9utils" - [ -d "${project}" ] || ./fetch "${project%/*}" \ - || err "Cannot download project, ${project%/*}" + handle_dependencies + run_make_command +} + +handle_dependencies() +{ + [ -d "${project}" ] || ./fetch "${project%/*}" || \ + err "Cannot download project, ${project%/*}" [ -d "${project}" ] || err "Project, ${project%/*}, not downloaded" if [ "${project}" = "uefitool" ]; then @@ -56,6 +62,10 @@ main() cmake UEFIExtract/ || err "cannot cmake UEFIExtract" ) fi +} + +run_make_command() +{ [ ! -z "${mode}" ] || \ make -C "${project}" || err "'make' failed (${project})" [ -z "${mode}" ] || \ |