buildscript: Improve loop for applying build_patches

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
This commit is contained in:
Adrian Schmutzler 2019-04-08 15:32:11 +02:00
parent 014f66a8d7
commit 9e6b4c6982
1 changed files with 4 additions and 6 deletions

View File

@ -115,12 +115,10 @@ get_source() {
}
patch_target() {
if [ "$(find "$PWD"/build_patches/openwrt/*.patch 2> /dev/null | wc -l)" -ge 1 ]; then
for patch in "$PWD"/build_patches/openwrt/*.patch; do
echo "Applying $patch:"
patch --no-backup-if-mismatch -p1 -d "$target" -i "$patch"
done
fi
for patch in $(ls "$PWD"/build_patches/openwrt/*.patch 2>/dev/null); do
echo "Applying $patch:"
patch --no-backup-if-mismatch -p1 -d "$target" -i "$patch"
done
}
prepare() {