diff options
-rwxr-xr-x | libs/project | 10 | ||||
-rwxr-xr-x | projects/grub/grub | 29 |
2 files changed, 24 insertions, 15 deletions
diff --git a/libs/project b/libs/project index fb986f89..dfb745a0 100755 --- a/libs/project +++ b/libs/project @@ -149,7 +149,13 @@ project_action() { printf '%s\n\n' "Project $project $action (with ${arguments:-no argument})" - if (set +e; "$action" "$@"); then + ( + set +e + + "$action" "$@" + ) + + if [[ $? -eq 0 ]]; then printf '\n%s\n' "Project $project $action (with ${arguments:-no argument}) completed" else printf 1>&2 '\n%s\n' "Project $project $action (with ${arguments:-no argument}) failed" @@ -789,7 +795,7 @@ project_update_check_git() { requirements "git" - if ! git_project_check "$repository" + if git_project_check "$repository" then # Git repository should always be updated (even if upstream didn't progress). # For instance, this is useful for testing new versions of patches without changing revision. 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() { |