forked from public/airgap
1
0
Fork 0

make patches optional

This commit is contained in:
Lance Vick 2020-09-09 04:07:35 -07:00
parent 3d631420b1
commit 51a134f00f
Signed by: lrvick
GPG Key ID: 8E47A1EC35A1551D
1 changed files with 16 additions and 12 deletions

View File

@ -24,12 +24,14 @@ mkdir -p "$build_dir"
|| git clone "$buildroot_repo" "$buildroot_dir"
(
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}";
done;
git checkout "$buildroot_ref";
git reset --hard;
if [ "$(ls -A "${buildroot_external}/patches")" ]; then
for patch in "${buildroot_external}"/patches/*; do
echo "Applying patch: ${patch}";
patch -p1 --no-backup-if-mismatch < "${patch}";
done;
fi
make "airgap_${target}_defconfig";
make source;
)
@ -38,12 +40,14 @@ mkdir -p "$build_dir"
|| git clone "$heads_repo" "$heads_dir"
(
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}"
done
git checkout "$heads_ref";
git reset --hard;
if [ "$(ls -A "${heads_external}/patches")" ]; then
for patch in "${heads_external}"/patches/*; do
echo "Applying patch: ${patch}";
patch -p1 --no-backup-if-mismatch < "${patch}";
done;
fi
rsync -Pav "${heads_external}/boards/" "${heads_dir}/boards/"
[[ "$devices" =~ "librem" ]] \
&& (cd "$heads_dir/blobs/librem_kbl" && ./get_blobs.sh)