From 967b865adc73cfc86951fd80920d8304d7f2a54f Mon Sep 17 00:00:00 2001 From: Piotr Gorski Date: Thu, 15 Sep 2022 20:48:15 +0200 Subject: [PATCH] Add cachyos config flag Signed-off-by: Piotr Gorski --- PKGBUILD | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/PKGBUILD b/PKGBUILD index d72d2df..f3fc6b6 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -3,6 +3,12 @@ # Contributor: Tobias Powalowski # Contributor: Thomas Baechler +### Selecting CachyOS config +# ATTENTION - one of two predefined values should be selected! +# 'yes' - enable CachyOS config +# 'no' - disable CachyOS config +_cachy_config='yes' + ### Selecting the CPU scheduler # ATTENTION - one of seven predefined values should be selected! # 'bmq' - select 'BitMap Queue CPU scheduler' @@ -279,6 +285,23 @@ prepare() { "${srcdir}"/auto-cpu-optimization.sh fi + ### Selecting CachyOS config + if [ "$_cachy_config" = "yes" ]; then + echo "Enabling CachyOS config..." + scripts/config --enable CACHY_CONFIG + elif [ "$_cachy_config" = "no" ]; then + echo "Disabling CachyOS config..." + scripts/config --disable CACHY_CONFIG + else + if [ -n "$_cachy_config" ]; then + error "The value $_cachy_config is invalid. Choose the correct one again." + else + error "The value is empty. Choose the correct one again." + fi + error "Selecting CachyOS config failed!" + exit + fi + ### Selecting the CPU scheduler if [ "$_cpusched" = "bmq" ]; then echo "Selecting BMQ CPU scheduler..."