From c7ff176dba72ba298305c57d478d70a0b8a2295f Mon Sep 17 00:00:00 2001 From: Adel Kara Slimane Date: Mon, 10 Aug 2020 13:52:08 +0200 Subject: [PATCH] linux57: add interactive prompt for _misc_adds (#42) --- linux57-tkg/customization.cfg | 2 +- linux57-tkg/linux57-tkg-config/prepare | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/linux57-tkg/customization.cfg b/linux57-tkg/customization.cfg index c0cffcc..ed05dff 100644 --- a/linux57-tkg/customization.cfg +++ b/linux57-tkg/customization.cfg @@ -80,7 +80,7 @@ _ftracedisable="false" _numadisable="false" # Set to "true" to enable misc additions - May contain temporary fixes pending upstream or changes that can break on non-Arch - Kernel default is "true" -_misc_adds="true" +_misc_adds="" # Set to "1" to use CattaRappa mode (enabling full tickless), "2" for tickless idle only, or "0" for periodic ticks. # Full tickless can give higher performances in various cases but, depending on hardware, lower consistency. Just tickless idle can perform better on some platforms (mostly AMD based). diff --git a/linux57-tkg/linux57-tkg-config/prepare b/linux57-tkg/linux57-tkg-config/prepare index a3ce19e..a556ddb 100644 --- a/linux57-tkg/linux57-tkg-config/prepare +++ b/linux57-tkg/linux57-tkg-config/prepare @@ -142,7 +142,15 @@ _tkg_srcprep() { msg2 "Applying glitched base patch" patch -Np1 -i "$srcdir"/0003-glitched-base.patch - if [ "$_misc_adds" = "true" ]; then + if [ -z $_misc_adds ]; then + plain "Enable misc additions ? May contain temporary fixes pending upstream or changes that can break on non-Arch. " + read -rp "`echo $' > [Y]/n : '`" _interactive_misc_adds; + if [ "$_interactive_misc_adds" != "n" ] && [ "$_interactive_misc_adds" != "N" ]; then + _misc_adds="true" + fi + fi + + if [ "$_misc_adds" == "true" ]; then msg2 "Applying misc additions patch" patch -Np1 -i "$srcdir"/0012-misc-additions.patch fi