From 379c69bf12fa191abbbe3a16545dbace3455f7fa Mon Sep 17 00:00:00 2001 From: Andrew Robbins Date: Tue, 11 Jul 2017 23:12:38 -0400 Subject: Enable 'extglob' and replace some brace expansions Replace brace expansions with extended globs in a couple of places where brace expansions were erroneously used in place of actual pattern matching. This avoids potential errors concerning nonexisting files when patching sources. --- libreboot | 2 +- libs/git | 2 +- libs/project | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libreboot b/libreboot index cb3e3831..ce3735d0 100755 --- a/libreboot +++ b/libreboot @@ -16,7 +16,7 @@ # along with this program. If not, see . GLOBIGNORE=".:.." # This enables the shell option 'dotglob' as well. -shopt -s nullglob +shopt -s nullglob extglob libreboot_usage() { local action diff --git a/libs/git b/libs/git index 5869825d..550c5d60 100755 --- a/libs/git +++ b/libs/git @@ -243,7 +243,7 @@ git_project_patch_recursive() { git_project_patch_recursive "${project}" "${repository}" "${branch}" "$(dirname "${path}")" fi - for patch in "${patches_path}"/[!.]*.{patch,diff}; do + for patch in "${patches_path}"/[!.]*.@(patch|diff); do if [[ "${patch##*.}" == "patch" ]]; then git_patch "${repository_path}" "${branch}" "${patch}" else diff --git a/libs/project b/libs/project index 2728d4fa..d2779224 100755 --- a/libs/project +++ b/libs/project @@ -465,7 +465,7 @@ project_sources_prepare_patch() { local project_path="$(project_path "${project}")" local patches_path="${project_path}/${PATCHES}" - for patch in "${patches_path}"/[!.]*.{patch,diff}; do + for patch in "${patches_path}"/[!.]*.@(patch|diff); do diff_patch_file "${sources_path}" "${patch}" done } -- cgit v1.2.3-70-g09d2