diff options
author | David Cohen | 2023-05-15 23:18:24 -0500 |
---|---|---|
committer | David Cohen | 2023-05-15 23:20:15 -0500 |
commit | 989b630726cb0c795700d92075d15f9e9a5b2ad1 (patch) | |
tree | e6c6712ec7a2c6f13ac53c0898db460e87121958 /PKGBUILD | |
parent | f59368a6cd489c8e28777e64a8ee01b04efdcea0 (diff) | |
download | aur-989b630726cb0c795700d92075d15f9e9a5b2ad1.tar.gz |
IGNORE_USER_CUSTOM env variable will make PKGBUILD ignore user customizations
Signed-off-by: David Cohen <dacohen@pm.me>
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 22 |
1 files changed, 14 insertions, 8 deletions
@@ -6,7 +6,7 @@ # will be on config.extra file. pkgbase=linux-git -pkgver=v6.3.1.r0.a83b81b7392d.patched.stable.linux +pkgver=v6.4.rc2.r0.f1fcbaa18b28 pkgrel=1 pkgdesc="Linus Torvalds' Mainline Linux" url="https://www.kernel.org" @@ -76,7 +76,9 @@ pkgver() { prepare() { cd $_srcname - [[ -f "$_userremote" ]] && source "$_userremote" || source "../${_userremote##*/}" + if [[ -z ${IGNORE_USER_CUSTOM} ]]; then + [[ -f "$_userremote" ]] && source "$_userremote" || source "../${_userremote##*/}" + fi if [[ -n "$REMOTE" && -n "$COMMIT" ]]; then REMOTE_PREFIX=${source[0]##${_srcname}::git+} REMOTE_PREFIX=${REMOTE_PREFIX%%torvalds/linux} @@ -110,7 +112,9 @@ prepare() { patch -Np1 < "../$src" done - [[ -f "$_userpatches" ]] && source "$_userpatches" + if [[ -z ${IGNORE_USER_CUSTOM} ]]; then + [[ -f "$_userpatches" ]] && source "$_userpatches" + fi PATCHES_PREFIX=${_userpatches%%patches} _USER_PATCHES="0" for src in "${PATCHES}"; do @@ -121,14 +125,16 @@ prepare() { done # Let user see the patches were applied before proceed with the build - [[ ${_USER_PATCHES} = "1" ]] && sleep 2 + [[ ${_USER_PATCHES} = "1" ]] && sleep 5 echo "Setting config..." cat ../config ../config.extra > .config - if [[ -f "$_userconfig" ]]; then - cat $_userconfig >> .config - else - cat ../config.user >> .config + if [[ -z ${IGNORE_USER_CUSTOM} ]]; then + if [[ -f "$_userconfig" ]]; then + cat $_userconfig >> .config + else + cat ../config.user >> .config + fi fi _make olddefconfig diff -u ../config .config || : |