From patchwork Mon Apr 8 13:32:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [v2,2/2] buildscript: Improve loop for applying build_patches From: Adrian Schmutzler X-Patchwork-Id: 1044 Message-Id: <20190408133211.8970-2-freifunk@adrianschmutzler.de> To: franken-dev@freifunk.net Date: Mon, 8 Apr 2019 15:32:11 +0200 Signed-off-by: Adrian Schmutzler Reviewed-by: Robert Langhammer --- buildscript | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/buildscript b/buildscript index 1605b9cf..4e4da92f 100755 --- a/buildscript +++ b/buildscript @@ -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() {