From 1c5677e98e25aa2eaa2f545d851678c05127445d Mon Sep 17 00:00:00 2001 From: Andrew Robbins Date: Thu, 18 Apr 2019 22:31:51 -0400 Subject: 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). --- projects/grub/grub | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'projects/grub') 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() { -- cgit v1.2.3-70-g09d2