[patch master v2] fix patching error by emty build_patches dir

Tim Niemeyer tim at tn-x.org
Sa Sep 10 12:17:10 CEST 2016


Am Montag, den 29.08.2016, 02:45 +0200 schrieb Jan-Tarek Butt:
> ---
>  buildscript | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> 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
             ^-- SC2006: Use $(..) instead of deprecated `..`
              ^-- SC2012: Use find instead of ls to better handle non-alphanumeric filenames.
                 ^-- SC2086: Double quote to prevent globbing and word splitting.

Tim

> +        for patch in "$PWD"/build_patches/openwrt/*.patch; do
> +            patch --no-backup-if-mismatch -p0 -d "$target" -i "$patch"
> +        done
> +    fi
>  }
> 
>  prepare() {
> --
> 2.9.3
> 

-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname   : signature.asc
Dateityp    : application/pgp-signature
Dateigröße  : 473 bytes
Beschreibung: This is a digitally signed message part
URL         : <http://lists.freifunk.net/pipermail/franken-dev-freifunk.net/attachments/20160910/0d368f65/attachment.sig>


Mehr Informationen über die Mailingliste franken-dev