From 2bb5855011f83a03e028bed2f4efec78378a5ce1 Mon Sep 17 00:00:00 2001 From: jc_gargma Date: Sun, 17 May 2020 13:34:54 -0700 Subject: Add toggle to ease disabling custom config --- PKGBUILD | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 366c040..f5ed900 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -16,6 +16,8 @@ # Arch version enables VMware and HyperV # Arch version builds documentation +_custom=1 + pkgbase=linux-ck _supver=5 _majver=6 @@ -134,8 +136,10 @@ prepare() { echo "Setting config..." # we are in src/linux-x.yy.zz, looking for a config next to the pkgbuild - if [ -f ${SRCDEST}/config.ck.previous ]; then - cp ${SRCDEST}/config.ck.previous .config + if [ "$_custom" == "1" ]; then + if [ -f ${SRCDEST}/config.ck.previous ]; then + cp ${SRCDEST}/config.ck.previous .config + fi else cp ../config .config fi @@ -166,8 +170,10 @@ prepare() { cat ../version.temp | tr -d "\n" > version # back up the config - echo "Backing up config..." - cp .config ${SRCDEST}/config.ck.previous + if [ "$_custom" == "1" ]; then + echo "Backing up config..." + cp .config ${SRCDEST}/config.ck.previous + fi echo "Prepared $pkgbase version $(