Allow using upper-cased "Y" to answer questions (#45)

This commit is contained in:
FLGX 2020-08-15 19:18:32 +02:00 committed by GitHub
parent 0c8886a2b2
commit ec0fcc15d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 37 additions and 37 deletions

View File

@ -78,7 +78,7 @@ else
warning "Something is wrong with your cpusched selection. Do you want to fallback to CFS (default)?" warning "Something is wrong with your cpusched selection. Do you want to fallback to CFS (default)?"
read -rp "`echo $' > N/y : '`" _fallback; read -rp "`echo $' > N/y : '`" _fallback;
fi fi
if [ "$_fallback" == "y" ] || [ "$_nofallback" == "true" ]; then if [[ "$_fallback" =~ [yY] ]] || [ "$_nofallback" == "true" ]; then
echo "_cpusched=\"cfs\"" > "$_where"/cpuschedset echo "_cpusched=\"cfs\"" > "$_where"/cpuschedset
else else
error "Exiting..." error "Exiting..."

View File

@ -9,7 +9,7 @@ user_patcher() {
printf '%s\n' "${_patches[@]}" printf '%s\n' "${_patches[@]}"
read -rp "Do you want to install it/them? - Be careful with that ;)"$'\n> N/y : ' _CONDITION; read -rp "Do you want to install it/them? - Be careful with that ;)"$'\n> N/y : ' _CONDITION;
fi fi
if [ "$_CONDITION" == "y" ] || [ "$_user_patches_no_confirm" == "true" ]; then if [[ "$_CONDITION" =~ [yY] ]] || [ "$_user_patches_no_confirm" == "true" ]; then
for _f in "${_patches[@]}"; do for _f in "${_patches[@]}"; do
if [ -e "${_f}" ]; then if [ -e "${_f}" ]; then
msg2 "######################################################" msg2 "######################################################"
@ -31,7 +31,7 @@ user_patcher() {
printf '%s\n' "${_patches[@]}" printf '%s\n' "${_patches[@]}"
read -rp "Do you want to install it/them? - Be careful with that ;)"$'\n> N/y : ' _CONDITION; read -rp "Do you want to install it/them? - Be careful with that ;)"$'\n> N/y : ' _CONDITION;
fi fi
if [ "$_CONDITION" == "y" ] || [ "$_user_patches_no_confirm" == "true" ]; then if [[ "$_CONDITION" =~ [yY] ]] || [ "$_user_patches_no_confirm" == "true" ]; then
for _f in "${_patches[@]}"; do for _f in "${_patches[@]}"; do
if [ -e "${_f}" ]; then if [ -e "${_f}" ]; then
msg2 "######################################################" msg2 "######################################################"
@ -467,7 +467,7 @@ _tkg_srcprep() {
plain "and analyzing of kernel functions." plain "and analyzing of kernel functions."
read -rp "`echo $' > N/y : '`" CONDITION2; read -rp "`echo $' > N/y : '`" CONDITION2;
fi fi
if [ "$CONDITION2" == "y" ] || [ "$_ftracedisable" == "true" ]; then if [[ "$CONDITION2" =~ [yY] ]] || [ "$_ftracedisable" == "true" ]; then
sed -i -e 's/CONFIG_FUNCTION_TRACER=y/# CONFIG_FUNCTION_TRACER is not set/' ./.config sed -i -e 's/CONFIG_FUNCTION_TRACER=y/# CONFIG_FUNCTION_TRACER is not set/' ./.config
sed -i -e 's/CONFIG_FUNCTION_GRAPH_TRACER=y/# CONFIG_FUNCTION_GRAPH_TRACER is not set/' ./.config sed -i -e 's/CONFIG_FUNCTION_GRAPH_TRACER=y/# CONFIG_FUNCTION_GRAPH_TRACER is not set/' ./.config
fi fi
@ -479,7 +479,7 @@ _tkg_srcprep() {
plain "https://bbs.archlinux.org/viewtopic.php?id=239174" plain "https://bbs.archlinux.org/viewtopic.php?id=239174"
read -rp "`echo $' > N/y : '`" CONDITION3; read -rp "`echo $' > N/y : '`" CONDITION3;
fi fi
if [ "$CONDITION3" == "y" ] || [ "$_numadisable" == "true" ]; then if [[ "$CONDITION3" =~ [yY] ]] || [ "$_numadisable" == "true" ]; then
# disable NUMA since 99.9% of users do not have multiple CPUs but do have multiple cores in one CPU # disable NUMA since 99.9% of users do not have multiple CPUs but do have multiple cores in one CPU
sed -i -e 's/CONFIG_NUMA=y/# CONFIG_NUMA is not set/' \ sed -i -e 's/CONFIG_NUMA=y/# CONFIG_NUMA is not set/' \
-i -e '/CONFIG_AMD_NUMA=y/d' \ -i -e '/CONFIG_AMD_NUMA=y/d' \
@ -533,7 +533,7 @@ _tkg_srcprep() {
plain "and improve throughput on other schedulers (at the cost of latency)" plain "and improve throughput on other schedulers (at the cost of latency)"
read -rp "`echo $' > N/y : '`" CONDITION5; read -rp "`echo $' > N/y : '`" CONDITION5;
fi fi
if [ "$CONDITION5" == "y" ] || [ "$_voluntary_preempt" == "true" ]; then if [[ "$CONDITION5" =~ [yY] ]] || [ "$_voluntary_preempt" == "true" ]; then
sed -i -e 's/CONFIG_PREEMPT=y/# CONFIG_PREEMPT is not set/' ./.config sed -i -e 's/CONFIG_PREEMPT=y/# CONFIG_PREEMPT is not set/' ./.config
sed -i -e 's/CONFIG_PREEMPT_LL=y/# CONFIG_PREEMPT_LL is not set/' ./.config sed -i -e 's/CONFIG_PREEMPT_LL=y/# CONFIG_PREEMPT_LL is not set/' ./.config
sed -i -e 's/# CONFIG_PREEMPT_VOLUNTARY is not set/CONFIG_PREEMPT_VOLUNTARY=y/' ./.config sed -i -e 's/# CONFIG_PREEMPT_VOLUNTARY is not set/CONFIG_PREEMPT_VOLUNTARY=y/' ./.config
@ -545,7 +545,7 @@ _tkg_srcprep() {
plain "Enable Device Tree and Open Firmware support?" plain "Enable Device Tree and Open Firmware support?"
read -rp "`echo $' > N/y : '`" CONDITION6; read -rp "`echo $' > N/y : '`" CONDITION6;
fi fi
if [ "$CONDITION6" == "y" ] || [ "$_OFenable" == "true" ]; then if [[ "$CONDITION6" =~ [yY] ]] || [ "$_OFenable" == "true" ]; then
sed -i -e 's/# CONFIG_OF is not set/CONFIG_OF=y/' ./.config sed -i -e 's/# CONFIG_OF is not set/CONFIG_OF=y/' ./.config
fi fi
@ -556,7 +556,7 @@ _tkg_srcprep() {
plain "https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#Bypassing_the_IOMMU_groups_.28ACS_override_patch.29" plain "https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#Bypassing_the_IOMMU_groups_.28ACS_override_patch.29"
read -rp "`echo $' > N/y : '`" CONDITION7; read -rp "`echo $' > N/y : '`" CONDITION7;
fi fi
if [ "$CONDITION7" == "y" ] || [ "$_acs_override" == "true" ]; then if [[ "$CONDITION7" =~ [yY] ]] || [ "$_acs_override" == "true" ]; then
patch -Np1 -i ../0006-add-acs-overrides_iommu.patch patch -Np1 -i ../0006-add-acs-overrides_iommu.patch
fi fi
@ -567,7 +567,7 @@ _tkg_srcprep() {
# plain "https://bcachefs.org/" # plain "https://bcachefs.org/"
# read -rp "`echo $' > N/y : '`" CONDITION8; # read -rp "`echo $' > N/y : '`" CONDITION8;
# fi # fi
# if [ "$CONDITION8" == "y" ] || [ "$_bcachefs" == "true" ]; then # if [[ "$CONDITION8" =~ [yY] ]] || [ "$_bcachefs" == "true" ]; then
# patch -Np1 -i ../0008-5.4-bcachefs.patch # patch -Np1 -i ../0008-5.4-bcachefs.patch
# echo "CONFIG_BCACHEFS_FS=m" >> ./.config # echo "CONFIG_BCACHEFS_FS=m" >> ./.config
# echo "CONFIG_BCACHEFS_QUOTA=y" >> ./.config # echo "CONFIG_BCACHEFS_QUOTA=y" >> ./.config
@ -584,7 +584,7 @@ _tkg_srcprep() {
plain "https://steamcommunity.com/games/221410/announcements/detail/2957094910196249305" plain "https://steamcommunity.com/games/221410/announcements/detail/2957094910196249305"
read -rp "`echo $' > N/y : '`" CONDITION9; read -rp "`echo $' > N/y : '`" CONDITION9;
fi fi
if [ "$CONDITION9" == "y" ] || [ "$_fsync" == "true" ]; then if [[ "$CONDITION9" =~ [yY] ]] || [ "$_fsync" == "true" ]; then
patch -Np1 -i ../0007-v5.4-fsync.patch patch -Np1 -i ../0007-v5.4-fsync.patch
fi fi
@ -595,7 +595,7 @@ _tkg_srcprep() {
plain "https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/kernel/export_kernel_fpu_functions_5_3.patch" plain "https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/kernel/export_kernel_fpu_functions_5_3.patch"
read -rp "`echo $' > N/y : '`" CONDITION11; read -rp "`echo $' > N/y : '`" CONDITION11;
fi fi
if [ "$CONDITION11" == "y" ] || [ "$_zfsfix" == "true" ]; then if [[ "$CONDITION11" =~ [yY] ]] || [ "$_zfsfix" == "true" ]; then
patch -Np1 -i ../0011-ZFS-fix.patch patch -Np1 -i ../0011-ZFS-fix.patch
fi fi
@ -637,7 +637,7 @@ _tkg_srcprep() {
plain "!!!! Make sure to have a well populated db !!!!" plain "!!!! Make sure to have a well populated db !!!!"
read -rp "`echo $' > N/y : '`" CONDITIONMPDB; read -rp "`echo $' > N/y : '`" CONDITIONMPDB;
fi fi
if [ "$CONDITIONMPDB" == "y" ] || [ "$_modprobeddb" == "true" ]; then if [[ "$CONDITIONMPDB" =~ [yY] ]] || [ "$_modprobeddb" == "true" ]; then
sudo modprobed-db recall sudo modprobed-db recall
make localmodconfig make localmodconfig
fi fi

View File

@ -147,7 +147,7 @@ if [ "$1" == "install" ]; then
if make -j ${_thread_num} deb-pkg LOCALVERSION=-${_kernel_flavor}; then if make -j ${_thread_num} deb-pkg LOCALVERSION=-${_kernel_flavor}; then
msg2 "Building successfully finished!" msg2 "Building successfully finished!"
read -p "Do you want to install the new Kernel ? y/[n]: " _install read -p "Do you want to install the new Kernel ? y/[n]: " _install
if [ $_install == "y" ] || [ $_install == "Y" ] || [ $_install == "yes" ] || [ $_install == "Yes" ]; then if [[ $_install =~ [yY] ]] || [[ $_install =~ [yY] ]] || [ $_install == "yes" ] || [ $_install == "Yes" ]; then
cd "$_where" cd "$_where"
_kernelname=$_basekernel.$_kernel_subver-$_kernel_flavor _kernelname=$_basekernel.$_kernel_subver-$_kernel_flavor
_headers_deb=linux-headers-${_kernelname}*.deb _headers_deb=linux-headers-${_kernelname}*.deb

View File

@ -57,7 +57,7 @@ _tkg_initscript() {
warning "Something is wrong with your cpusched selection. Do you want to fallback to CFS (default)?" warning "Something is wrong with your cpusched selection. Do you want to fallback to CFS (default)?"
read -rp "`echo $' > N/y : '`" _fallback; read -rp "`echo $' > N/y : '`" _fallback;
fi fi
if [ "$_fallback" == "y" ] || [ "$_nofallback" == "true" ]; then if [[ "$_fallback" =~ [yY] ]] || [ "$_nofallback" == "true" ]; then
echo "_cpusched=\"cfs\"" > "$_where"/cpuschedset echo "_cpusched=\"cfs\"" > "$_where"/cpuschedset
else else
error "Exiting..." error "Exiting..."
@ -77,7 +77,7 @@ user_patcher() {
printf '%s\n' "${_patches[@]}" printf '%s\n' "${_patches[@]}"
read -rp "Do you want to install it/them? - Be careful with that ;)"$'\n> N/y : ' _CONDITION; read -rp "Do you want to install it/them? - Be careful with that ;)"$'\n> N/y : ' _CONDITION;
fi fi
if [ "$_CONDITION" == "y" ] || [ "$_user_patches_no_confirm" == "true" ]; then if [[ "$_CONDITION" =~ [yY] ]] || [ "$_user_patches_no_confirm" == "true" ]; then
for _f in "${_patches[@]}"; do for _f in "${_patches[@]}"; do
if [ -e "${_f}" ]; then if [ -e "${_f}" ]; then
msg2 "######################################################" msg2 "######################################################"
@ -99,7 +99,7 @@ user_patcher() {
printf '%s\n' "${_patches[@]}" printf '%s\n' "${_patches[@]}"
read -rp "Do you want to install it/them? - Be careful with that ;)"$'\n> N/y : ' _CONDITION; read -rp "Do you want to install it/them? - Be careful with that ;)"$'\n> N/y : ' _CONDITION;
fi fi
if [ "$_CONDITION" == "y" ] || [ "$_user_patches_no_confirm" == "true" ]; then if [[ "$_CONDITION" =~ [yY] ]] || [ "$_user_patches_no_confirm" == "true" ]; then
for _f in "${_patches[@]}"; do for _f in "${_patches[@]}"; do
if [ -e "${_f}" ]; then if [ -e "${_f}" ]; then
msg2 "######################################################" msg2 "######################################################"
@ -610,7 +610,7 @@ _tkg_srcprep() {
plain "and analyzing of kernel functions." plain "and analyzing of kernel functions."
read -rp "`echo $' > N/y : '`" CONDITION2; read -rp "`echo $' > N/y : '`" CONDITION2;
fi fi
if [ "$CONDITION2" == "y" ] || [ "$_ftracedisable" == "true" ]; then if [[ "$CONDITION2" =~ [yY] ]] || [ "$_ftracedisable" == "true" ]; then
sed -i -e 's/CONFIG_FUNCTION_TRACER=y/# CONFIG_FUNCTION_TRACER is not set/' ./.config sed -i -e 's/CONFIG_FUNCTION_TRACER=y/# CONFIG_FUNCTION_TRACER is not set/' ./.config
sed -i -e 's/CONFIG_FUNCTION_GRAPH_TRACER=y/# CONFIG_FUNCTION_GRAPH_TRACER is not set/' ./.config sed -i -e 's/CONFIG_FUNCTION_GRAPH_TRACER=y/# CONFIG_FUNCTION_GRAPH_TRACER is not set/' ./.config
fi fi
@ -622,7 +622,7 @@ _tkg_srcprep() {
plain "https://bbs.archlinux.org/viewtopic.php?id=239174" plain "https://bbs.archlinux.org/viewtopic.php?id=239174"
read -rp "`echo $' > N/y : '`" CONDITION3; read -rp "`echo $' > N/y : '`" CONDITION3;
fi fi
if [ "$CONDITION3" == "y" ] || [ "$_numadisable" == "true" ]; then if [[ "$CONDITION3" =~ [yY] ]] || [ "$_numadisable" == "true" ]; then
# disable NUMA since 99.9% of users do not have multiple CPUs but do have multiple cores in one CPU # disable NUMA since 99.9% of users do not have multiple CPUs but do have multiple cores in one CPU
sed -i -e 's/CONFIG_NUMA=y/# CONFIG_NUMA is not set/' \ sed -i -e 's/CONFIG_NUMA=y/# CONFIG_NUMA is not set/' \
-i -e '/CONFIG_AMD_NUMA=y/d' \ -i -e '/CONFIG_AMD_NUMA=y/d' \
@ -689,7 +689,7 @@ _tkg_srcprep() {
plain "and improve throughput on other schedulers (at the cost of latency)" plain "and improve throughput on other schedulers (at the cost of latency)"
read -rp "`echo $' > N/y : '`" CONDITION5; read -rp "`echo $' > N/y : '`" CONDITION5;
fi fi
if [ "$CONDITION5" == "y" ] || [ "$_voluntary_preempt" == "true" ]; then if [[ "$CONDITION5" =~ [yY] ]] || [ "$_voluntary_preempt" == "true" ]; then
sed -i -e 's/CONFIG_PREEMPT=y/# CONFIG_PREEMPT is not set/' ./.config sed -i -e 's/CONFIG_PREEMPT=y/# CONFIG_PREEMPT is not set/' ./.config
sed -i -e 's/CONFIG_PREEMPT_LL=y/# CONFIG_PREEMPT_LL is not set/' ./.config sed -i -e 's/CONFIG_PREEMPT_LL=y/# CONFIG_PREEMPT_LL is not set/' ./.config
sed -i -e 's/# CONFIG_PREEMPT_VOLUNTARY is not set/CONFIG_PREEMPT_VOLUNTARY=y/' ./.config sed -i -e 's/# CONFIG_PREEMPT_VOLUNTARY is not set/CONFIG_PREEMPT_VOLUNTARY=y/' ./.config
@ -701,7 +701,7 @@ _tkg_srcprep() {
plain "Enable Device Tree and Open Firmware support?" plain "Enable Device Tree and Open Firmware support?"
read -rp "`echo $' > N/y : '`" CONDITION6; read -rp "`echo $' > N/y : '`" CONDITION6;
fi fi
if [ "$CONDITION6" == "y" ] || [ "$_OFenable" == "true" ]; then if [[ "$CONDITION6" =~ [yY] ]] || [ "$_OFenable" == "true" ]; then
sed -i -e 's/# CONFIG_OF is not set/CONFIG_OF=y/' ./.config sed -i -e 's/# CONFIG_OF is not set/CONFIG_OF=y/' ./.config
fi fi
@ -712,7 +712,7 @@ _tkg_srcprep() {
plain "https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#Bypassing_the_IOMMU_groups_.28ACS_override_patch.29" plain "https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#Bypassing_the_IOMMU_groups_.28ACS_override_patch.29"
read -rp "`echo $' > N/y : '`" CONDITION7; read -rp "`echo $' > N/y : '`" CONDITION7;
fi fi
if [ "$CONDITION7" == "y" ] || [ "$_acs_override" == "true" ]; then if [[ "$CONDITION7" =~ [yY] ]] || [ "$_acs_override" == "true" ]; then
msg2 "Patching ACS override" msg2 "Patching ACS override"
patch -Np1 -i "$srcdir"/0006-add-acs-overrides_iommu.patch patch -Np1 -i "$srcdir"/0006-add-acs-overrides_iommu.patch
fi fi
@ -724,7 +724,7 @@ _tkg_srcprep() {
plain "https://bcachefs.org/" plain "https://bcachefs.org/"
read -rp "`echo $' > N/y : '`" CONDITION8; read -rp "`echo $' > N/y : '`" CONDITION8;
fi fi
if [ "$CONDITION8" == "y" ] || [ "$_bcachefs" == "true" ]; then if [[ "$CONDITION8" =~ [yY] ]] || [ "$_bcachefs" == "true" ]; then
msg2 "Patching Bcache filesystem support override" msg2 "Patching Bcache filesystem support override"
patch -Np1 -i "$srcdir"/0008-5.7-bcachefs.patch patch -Np1 -i "$srcdir"/0008-5.7-bcachefs.patch
@ -743,7 +743,7 @@ _tkg_srcprep() {
plain "https://steamcommunity.com/games/221410/announcements/detail/2957094910196249305" plain "https://steamcommunity.com/games/221410/announcements/detail/2957094910196249305"
read -rp "`echo $' > N/y : '`" CONDITION9; read -rp "`echo $' > N/y : '`" CONDITION9;
fi fi
if [ "$CONDITION9" == "y" ] || [ "$_fsync" == "true" ]; then if [[ "$CONDITION9" =~ [yY] ]] || [ "$_fsync" == "true" ]; then
msg2 "Patching Fsync support" msg2 "Patching Fsync support"
patch -Np1 -i "$srcdir"/0007-v5.7-fsync.patch patch -Np1 -i "$srcdir"/0007-v5.7-fsync.patch
fi fi
@ -755,7 +755,7 @@ _tkg_srcprep() {
plain "https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/kernel/export_kernel_fpu_functions_5_3.patch" plain "https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/kernel/export_kernel_fpu_functions_5_3.patch"
read -rp "`echo $' > N/y : '`" CONDITION11; read -rp "`echo $' > N/y : '`" CONDITION11;
fi fi
if [ "$CONDITION11" == "y" ] || [ "$_zfsfix" == "true" ]; then if [[ "$CONDITION11" =~ [yY] ]] || [ "$_zfsfix" == "true" ]; then
msg2 "Patching missing symbol for AES-NI/AVX support on ZFS" msg2 "Patching missing symbol for AES-NI/AVX support on ZFS"
patch -Np1 -i "$srcdir"/0011-ZFS-fix.patch patch -Np1 -i "$srcdir"/0011-ZFS-fix.patch
fi fi
@ -800,7 +800,7 @@ _tkg_srcprep() {
plain "!!!! Make sure to have a well populated db !!!!" plain "!!!! Make sure to have a well populated db !!!!"
read -rp "`echo $' > N/y : '`" CONDITIONMPDB; read -rp "`echo $' > N/y : '`" CONDITIONMPDB;
fi fi
if [ "$CONDITIONMPDB" == "y" ] || [ "$_modprobeddb" == "true" ]; then if [[ "$CONDITIONMPDB" =~ [yY] ]] || [ "$_modprobeddb" == "true" ]; then
sudo modprobed-db recall sudo modprobed-db recall
make localmodconfig make localmodconfig
fi fi

View File

@ -76,7 +76,7 @@ else
warning "Something is wrong with your cpusched selection. Do you want to fallback to CFS (default)?" warning "Something is wrong with your cpusched selection. Do you want to fallback to CFS (default)?"
read -rp "`echo $' > N/y : '`" _fallback; read -rp "`echo $' > N/y : '`" _fallback;
fi fi
if [ "$_fallback" == "y" ] || [ "$_nofallback" == "true" ]; then if [[ "$_fallback" =~ [yY] ]] || [ "$_nofallback" == "true" ]; then
echo "_cpusched=\"cfs\"" > "$_where"/cpuschedset echo "_cpusched=\"cfs\"" > "$_where"/cpuschedset
else else
error "Exiting..." error "Exiting..."
@ -167,7 +167,7 @@ user_patcher() {
printf '%s\n' "${_patches[@]}" printf '%s\n' "${_patches[@]}"
read -rp "Do you want to install it/them? - Be careful with that ;)"$'\n> N/y : ' _CONDITION; read -rp "Do you want to install it/them? - Be careful with that ;)"$'\n> N/y : ' _CONDITION;
fi fi
if [ "$_CONDITION" == "y" ] || [ "$_user_patches_no_confirm" == "true" ]; then if [[ "$_CONDITION" =~ [yY] ]] || [ "$_user_patches_no_confirm" == "true" ]; then
for _f in "${_patches[@]}"; do for _f in "${_patches[@]}"; do
if [ -e "${_f}" ]; then if [ -e "${_f}" ]; then
msg2 "######################################################" msg2 "######################################################"
@ -189,7 +189,7 @@ user_patcher() {
printf '%s\n' "${_patches[@]}" printf '%s\n' "${_patches[@]}"
read -rp "Do you want to install it/them? - Be careful with that ;)"$'\n> N/y : ' _CONDITION; read -rp "Do you want to install it/them? - Be careful with that ;)"$'\n> N/y : ' _CONDITION;
fi fi
if [ "$_CONDITION" == "y" ] || [ "$_user_patches_no_confirm" == "true" ]; then if [[ "$_CONDITION" =~ [yY] ]] || [ "$_user_patches_no_confirm" == "true" ]; then
for _f in "${_patches[@]}"; do for _f in "${_patches[@]}"; do
if [ -e "${_f}" ]; then if [ -e "${_f}" ]; then
msg2 "######################################################" msg2 "######################################################"

View File

@ -454,7 +454,7 @@ _tkg_srcprep() {
plain "and analyzing of kernel functions." plain "and analyzing of kernel functions."
read -rp "`echo $' > N/y : '`" CONDITION2; read -rp "`echo $' > N/y : '`" CONDITION2;
fi fi
if [ "$CONDITION2" == "y" ] || [ "$_ftracedisable" == "true" ]; then if [[ "$CONDITION2" =~ [yY] ]] || [ "$_ftracedisable" == "true" ]; then
sed -i -e 's/CONFIG_FUNCTION_TRACER=y/# CONFIG_FUNCTION_TRACER is not set/' ./.config sed -i -e 's/CONFIG_FUNCTION_TRACER=y/# CONFIG_FUNCTION_TRACER is not set/' ./.config
sed -i -e 's/CONFIG_FUNCTION_GRAPH_TRACER=y/# CONFIG_FUNCTION_GRAPH_TRACER is not set/' ./.config sed -i -e 's/CONFIG_FUNCTION_GRAPH_TRACER=y/# CONFIG_FUNCTION_GRAPH_TRACER is not set/' ./.config
fi fi
@ -466,7 +466,7 @@ _tkg_srcprep() {
plain "https://bbs.archlinux.org/viewtopic.php?id=239174" plain "https://bbs.archlinux.org/viewtopic.php?id=239174"
read -rp "`echo $' > N/y : '`" CONDITION3; read -rp "`echo $' > N/y : '`" CONDITION3;
fi fi
if [ "$CONDITION3" == "y" ] || [ "$_numadisable" == "true" ]; then if [[ "$CONDITION3" =~ [yY] ]] || [ "$_numadisable" == "true" ]; then
# disable NUMA since 99.9% of users do not have multiple CPUs but do have multiple cores in one CPU # disable NUMA since 99.9% of users do not have multiple CPUs but do have multiple cores in one CPU
sed -i -e 's/CONFIG_NUMA=y/# CONFIG_NUMA is not set/' \ sed -i -e 's/CONFIG_NUMA=y/# CONFIG_NUMA is not set/' \
-i -e '/CONFIG_AMD_NUMA=y/d' \ -i -e '/CONFIG_AMD_NUMA=y/d' \
@ -533,7 +533,7 @@ _tkg_srcprep() {
plain "and improve throughput on other schedulers (at the cost of latency)" plain "and improve throughput on other schedulers (at the cost of latency)"
read -rp "`echo $' > N/y : '`" CONDITION5; read -rp "`echo $' > N/y : '`" CONDITION5;
fi fi
if [ "$CONDITION5" == "y" ] || [ "$_voluntary_preempt" == "true" ]; then if [[ "$CONDITION5" =~ [yY] ]] || [ "$_voluntary_preempt" == "true" ]; then
sed -i -e 's/CONFIG_PREEMPT=y/# CONFIG_PREEMPT is not set/' ./.config sed -i -e 's/CONFIG_PREEMPT=y/# CONFIG_PREEMPT is not set/' ./.config
sed -i -e 's/CONFIG_PREEMPT_LL=y/# CONFIG_PREEMPT_LL is not set/' ./.config sed -i -e 's/CONFIG_PREEMPT_LL=y/# CONFIG_PREEMPT_LL is not set/' ./.config
sed -i -e 's/# CONFIG_PREEMPT_VOLUNTARY is not set/CONFIG_PREEMPT_VOLUNTARY=y/' ./.config sed -i -e 's/# CONFIG_PREEMPT_VOLUNTARY is not set/CONFIG_PREEMPT_VOLUNTARY=y/' ./.config
@ -545,7 +545,7 @@ _tkg_srcprep() {
plain "Enable Device Tree and Open Firmware support?" plain "Enable Device Tree and Open Firmware support?"
read -rp "`echo $' > N/y : '`" CONDITION6; read -rp "`echo $' > N/y : '`" CONDITION6;
fi fi
if [ "$CONDITION6" == "y" ] || [ "$_OFenable" == "true" ]; then if [[ "$CONDITION6" =~ [yY] ]] || [ "$_OFenable" == "true" ]; then
sed -i -e 's/# CONFIG_OF is not set/CONFIG_OF=y/' ./.config sed -i -e 's/# CONFIG_OF is not set/CONFIG_OF=y/' ./.config
fi fi
@ -556,7 +556,7 @@ _tkg_srcprep() {
plain "https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#Bypassing_the_IOMMU_groups_.28ACS_override_patch.29" plain "https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#Bypassing_the_IOMMU_groups_.28ACS_override_patch.29"
read -rp "`echo $' > N/y : '`" CONDITION7; read -rp "`echo $' > N/y : '`" CONDITION7;
fi fi
if [ "$CONDITION7" == "y" ] || [ "$_acs_override" == "true" ]; then if [[ "$CONDITION7" =~ [yY] ]] || [ "$_acs_override" == "true" ]; then
patch -Np1 -i ../0006-add-acs-overrides_iommu.patch patch -Np1 -i ../0006-add-acs-overrides_iommu.patch
fi fi
@ -567,7 +567,7 @@ _tkg_srcprep() {
# plain "https://bcachefs.org/" # plain "https://bcachefs.org/"
# read -rp "`echo $' > N/y : '`" CONDITION8; # read -rp "`echo $' > N/y : '`" CONDITION8;
# fi # fi
# if [ "$CONDITION8" == "y" ] || [ "$_bcachefs" == "true" ]; then # if [[ "$CONDITION8" =~ [yY] ]] || [ "$_bcachefs" == "true" ]; then
# patch -Np1 -i ../0008-5.8-bcachefs.patch # patch -Np1 -i ../0008-5.8-bcachefs.patch
# echo "CONFIG_BCACHEFS_FS=m" >> ./.config # echo "CONFIG_BCACHEFS_FS=m" >> ./.config
# echo "CONFIG_BCACHEFS_QUOTA=y" >> ./.config # echo "CONFIG_BCACHEFS_QUOTA=y" >> ./.config
@ -584,7 +584,7 @@ _tkg_srcprep() {
plain "https://steamcommunity.com/games/221410/announcements/detail/2957094910196249305" plain "https://steamcommunity.com/games/221410/announcements/detail/2957094910196249305"
read -rp "`echo $' > N/y : '`" CONDITION9; read -rp "`echo $' > N/y : '`" CONDITION9;
fi fi
if [ "$CONDITION9" == "y" ] || [ "$_fsync" == "true" ]; then if [[ "$CONDITION9" =~ [yY] ]] || [ "$_fsync" == "true" ]; then
patch -Np1 -i ../0007-v5.8-fsync.patch patch -Np1 -i ../0007-v5.8-fsync.patch
fi fi
@ -595,7 +595,7 @@ _tkg_srcprep() {
plain "https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/kernel/export_kernel_fpu_functions_5_3.patch" plain "https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/kernel/export_kernel_fpu_functions_5_3.patch"
read -rp "`echo $' > N/y : '`" CONDITION11; read -rp "`echo $' > N/y : '`" CONDITION11;
fi fi
if [ "$CONDITION11" == "y" ] || [ "$_zfsfix" == "true" ]; then if [[ "$CONDITION11" =~ [yY] ]] || [ "$_zfsfix" == "true" ]; then
patch -Np1 -i ../0011-ZFS-fix.patch patch -Np1 -i ../0011-ZFS-fix.patch
fi fi
@ -637,7 +637,7 @@ _tkg_srcprep() {
plain "!!!! Make sure to have a well populated db !!!!" plain "!!!! Make sure to have a well populated db !!!!"
read -rp "`echo $' > N/y : '`" CONDITIONMPDB; read -rp "`echo $' > N/y : '`" CONDITIONMPDB;
fi fi
if [ "$CONDITIONMPDB" == "y" ] || [ "$_modprobeddb" == "true" ]; then if [[ "$CONDITIONMPDB" =~ [yY] ]] || [ "$_modprobeddb" == "true" ]; then
sudo modprobed-db recall sudo modprobed-db recall
make localmodconfig make localmodconfig
fi fi