From: mar77i Date: Thu, 15 Oct 2015 11:44:42 +0000 (+0200) Subject: make applying of patches and inserting config.h more readable X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FConfig%2FAUR.git;a=commitdiff_plain;h=05baa36be4daf4d131900915f21db125ce2ccbce make applying of patches and inserting config.h more readable --- diff --git a/PKGBUILD b/PKGBUILD index b206c21..9924c53 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -39,14 +39,15 @@ prepare() { -i config.mk sed '/@tic/d' -i Makefile for file in "${source[@]}"; do - if [[ "$file" != *.diff ]]; then + if [[ "$file" == "config.h" ]]; then # add config.h if present in source array # Note: this supersedes the above sed to config.def.h - [[ "$file" == "config.h" ]] && cp "$SRCDEST/$file" . + cp "$SRCDEST/$file" . continue + elif [[ "$file" == *.diff ]]; then + # add all patches present in source array + patch -Np1 <"$SRCDEST/$file" fi - # add all patches present in source array - patch -Np1 <"$SRCDEST/$file" done }