Skip to content

Commit 2959ddb

Browse files
committed
Apply all patches in patchdir
1 parent 8c94841 commit 2959ddb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

prerequisites/build-functions/build_and_install.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# shellcheck shell=bash
12
# Make the build directory, configure, and build
23
# shellcheck disable=SC2154
34

@@ -50,11 +51,10 @@ build_and_install()
5051
# Patch gfortran if necessary
5152
export patches_dir="${OPENCOARRAYS_SRC_DIR}/prerequisites/build-functions/patches/${package_to_build}/${version_to_build}"
5253
if [[ -d "${patches_dir:-}" ]]; then
53-
#TODO: check whether multiple patch files exist in $patches_dir and apply each one
54-
export patch_file="$(ls "$patches_dir")"
55-
info "Applying patch $patch_file to $package_to_build ${version_to_build}."
56-
patch_file="${patches_dir:-}/$patch_file"
57-
patch -p1 < "$patch_file"
54+
for patch in "${patches_dir%/}"*.diff ; do
55+
info "Applying patch ${patch##*/} to $package_to_build ${version_to_build}."
56+
patch -p1 < "$patch"
57+
done
5858
fi
5959

6060
# Use GCC's contrib/download_prerequisites script after modifying it, if necessary, to use the

0 commit comments

Comments
 (0)