]> git.immae.eu Git - perso/Immae/Config/AUR.git/commitdiff
automatically apply patches in source array
authormar77i <mysatyre@gmail.com>
Thu, 25 Jun 2015 08:50:01 +0000 (10:50 +0200)
committermar77i <mysatyre@gmail.com>
Thu, 25 Jun 2015 08:50:01 +0000 (10:50 +0200)
PKGBUILD

index b68e76f13b117ae84559cc2412ffefc2d5a6acd3..92713c4d2e4e64460b2e32df91b87947428e5493 100644 (file)
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -25,8 +25,8 @@ pkgver() {
 }
 
 prepare() {
+       local file
        cd "${srcdir}/${_pkgname}"
-       patch -p1 -i ../scrollback.patch # http://st.suckless.org/patches/st-scrollback.diff
        sed \
                -e '/char font/s/= .*/= "Fixed:pixelsize=13:style=SemiCondensed";/' \
                -e '/char worddelimiters/s/= .*/= " '"'"'`\\\"()[]{}<>|";/' \
@@ -39,6 +39,13 @@ prepare() {
                -e 's/_BSD_SOURCE/_DEFAULT_SOURCE/' \
                -i config.mk
        sed '/@tic/d' -i Makefile
+       for file in "${source[@]}"; do
+               if [[ "$file" != *.diff ]]; then
+                       continue
+               fi
+               # add all patches present in source array
+               patch -Np1 <"$SRCDEST/$file"
+       done
 }
 
 build() {