From patchwork Mon Aug 29 00:45:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [master,v2] fix patching error by emty build_patches dir From: Jan-Tarek Butt X-Patchwork-Id: 215 Message-Id: <20160829004538.32249-1-tarek@ring0.de> To: franken-dev@freifunk.net Cc: dev@lists.ffnw.de Date: Mon, 29 Aug 2016 02:45:38 +0200 --- buildscript | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) --- 2.9.3 diff --git a/buildscript b/buildscript index 04942e6..43997bf 100755 --- a/buildscript +++ b/buildscript @@ -122,9 +122,11 @@ get_source() { } patch_target() { - for patch in "$PWD"/build_patches/openwrt/*.patch; do - patch --no-backup-if-mismatch -p0 -d "$target" -i "$patch" - done + if (( `ls $PWD/build_patches/openwrt/*.patch 2> /dev/null | wc -l` )); then + for patch in "$PWD"/build_patches/openwrt/*.patch; do + patch --no-backup-if-mismatch -p0 -d "$target" -i "$patch" + done + fi } prepare() {