summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorPiotr Gorski2022-09-15 20:56:43 +0200
committerPiotr Gorski2022-09-15 20:56:43 +0200
commitb9e101f8ebf3839d5ffcef8979772cd11fda6520 (patch)
treeece30fc106f6363125265e9e4d53cc3c5af2b705 /PKGBUILD
parente2b0e3efd5798137c051728d3abd0130deb24cd0 (diff)
downloadaur-b9e101f8ebf3839d5ffcef8979772cd11fda6520.tar.gz
Add cachyos config flag
Signed-off-by: Piotr Gorski <lucjan.lucjanov@gmail.com>
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD23
1 files changed, 23 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 67014cfab686..f4c74858149e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,6 +3,12 @@
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
# Contributor: Thomas Baechler <thomas@archlinux.org>
+### 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..."