]> git.immae.eu Git - perso/Immae/Config/AUR.git/commitdiff
make applying of patches and inserting config.h more readable
authormar77i <mar77i@mar77i.ch>
Thu, 15 Oct 2015 11:44:42 +0000 (13:44 +0200)
committermar77i <mar77i@mar77i.ch>
Thu, 15 Oct 2015 11:44:42 +0000 (13:44 +0200)
PKGBUILD

index b206c213222dedf10b7c060728a08c81b21faadf..9924c538b3d9d3c8689e143c3da196c87767999c 100644 (file)
--- 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
 }