fix patching error by empty build_patches dir

Reviewed-by: Tim Niemeyer <tim@tn-x.org>
This commit is contained in:
Jan-Tarek Butt 2016-09-10 22:05:55 +02:00 committed by Tim Niemeyer
parent f9f590d3d6
commit 04b84ee7bf
1 changed files with 5 additions and 3 deletions

View File

@ -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 [ "$(find "$PWD"/build_patches/openwrt/*.patch 2> /dev/null | wc -l)" -ge 1 ]; then
for patch in "$PWD"/build_patches/openwrt/*.patch; do
patch --no-backup-if-mismatch -p0 -d "$target" -i "$patch"
done
fi
}
prepare() {