From 3d631420b1987a25fe0d91fcee7be24b3a953ccf Mon Sep 17 00:00:00 2001 From: "Lance R. Vick" Date: Wed, 12 Aug 2020 22:54:32 -0700 Subject: [PATCH] fix patching on repeated builds --- scripts/fetch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/fetch b/scripts/fetch index 98850b0..83d2301 100755 --- a/scripts/fetch +++ b/scripts/fetch @@ -22,10 +22,10 @@ mkdir -p "$build_dir" [ "$(ls -A "${buildroot_dir}")" ] \ || git clone "$buildroot_repo" "$buildroot_dir" -git -C "$buildroot_dir" reset --hard -git -C "$buildroot_dir" checkout "$buildroot_ref" ( cd $buildroot_dir; + git checkout "$buildroot_ref" + git reset --hard for patch in "${buildroot_external}"/patches/*; do echo "Applying patch: ${patch}"; patch -p1 --no-backup-if-mismatch < "${patch}"; @@ -36,10 +36,10 @@ git -C "$buildroot_dir" checkout "$buildroot_ref" [ "$(ls -A "${heads_dir}")" ] \ || git clone "$heads_repo" "$heads_dir" -git -C "$buildroot_dir" reset --hard -git -C "$heads_dir" checkout "$heads_ref" ( cd "$heads_dir"; + git checkout "$heads_ref" + git reset --hard for patch in "${heads_external}"/patches/*; do echo "Applying patch: ${patch}" patch -p1 --no-backup-if-mismatch < "${patch}"