aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Robbins <contact@andrewrobbins.info>2019-04-18 22:31:51 -0400
committerAndrew Robbins <contact@andrewrobbins.info>2019-04-18 23:15:27 -0400
commit1c5677e98e25aa2eaa2f545d851678c05127445d (patch)
treec5056bcd0f001500ef436cba7ff8e5449cb59a97
parentc2eabdd49e82bf7e86be034939a73b1b13db614f (diff)
downloadlibrebootfr-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).
-rwxr-xr-xprojects/grub/grub29
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() {