diff options
author | Andrew Robbins <contact@andrewrobbins.info> | 2019-04-18 22:31:51 -0400 |
---|---|---|
committer | Andrew Robbins <contact@andrewrobbins.info> | 2019-04-18 23:15:27 -0400 |
commit | 1c5677e98e25aa2eaa2f545d851678c05127445d (patch) | |
tree | c5056bcd0f001500ef436cba7ff8e5449cb59a97 /projects/grub | |
parent | c2eabdd49e82bf7e86be034939a73b1b13db614f (diff) | |
download | librebootfr-1c5677e98e25aa2eaa2f545d851678c05127445d.tar.gz librebootfr-1c5677e98e25aa2eaa2f545d851678c05127445d.zip |
projects/grub/grub: Stop build() on error
This way we can be sure we're not attempting to build when instead
we should be bailing out (i.e. when the project's sources are
not available).
Diffstat (limited to 'projects/grub')
-rwxr-xr-x | projects/grub/grub | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/projects/grub/grub b/projects/grub/grub index 8bc7cd43..3daca888 100755 --- a/projects/grub/grub +++ b/projects/grub/grub @@ -79,25 +79,28 @@ build() { local build_path="$(project_build_path "$project" "$@")" local raw_keymap_path="$project_path/$CONFIGS/keymaps" - mkdir -p "$build_path" + ( + set -e - grub_build_utils + mkdir -p "$build_path" - if [[ "$target" == 'bios' ]]; then - grub_build_floppy_image - else - grub_build_standalone_image - fi + grub_build_utils - for raw_keymap in "$raw_keymap_path"/*; do - grub_build_layout "$raw_keymap" - done + if [[ "$target" == 'bios' ]]; then + grub_build_floppy_image + else + grub_build_standalone_image + fi - grub_build_font + for raw_keymap in "$raw_keymap_path"/*; do + grub_build_layout "$raw_keymap" + done - grub_copy_modules + grub_build_font + grub_copy_modules - make -C "$sources_path" distclean + make -C "$sources_path" distclean + ) } build_check() { |