Skip to content

Commit

Permalink
make: fail if patch not found
Browse files Browse the repository at this point in the history
  • Loading branch information
duhow committed Dec 3, 2024
1 parent bcc469d commit f11ebae
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ endif
@for PATCH in scripts/??_*.sh; do \
echo ">> $$PATCH"; \
ROOTFS=$(BUILD_DIR) MODEL=$(MODEL) sh $$PATCH 2>&1; \
EXITCODE=$$? ; \
if [ $$EXITCODE -ne 0 ]; then \
echo "!!! ERROR: $$PATCH failed with exit code $$EXITCODE"; \
kill $$PPID ; \
fi; \
echo "----"; \
done | tee -a patch.log
@touch $(BUILD_DIR)/patched
Expand Down
5 changes: 5 additions & 0 deletions scripts/10_apply_patches.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/bin/sh

if ! command -v patch >/dev/null ; then
echo "[!] patch command not found, failing hard!"
exit 1
fi

echo "[*] Applying patches"
for PATCHFILE in patches/*.patch patches/${MODEL}/*.patch; do
echo ">> ${PATCHFILE}"
Expand Down

0 comments on commit f11ebae

Please sign in to comment.