PKGBUILDS/TkgThingy

212 lines
6.9 KiB
Plaintext

#!/bin/bash
## This script can create external configuration files for all -tkg packages and tools supporting the feature.
# Path to create the external config files in - Default is ~/.config/frogminer
_EXT_CONFIG_PATH=~/.config/frogminer
_cfg_loop() {
if [ -e "$_config_file_path"/"$_config_file_basename" ] && [ ! -e "$_EXT_CONFIG_PATH"/"$_config_file_targname" ]; then
cp -v "$_config_file_path"/"$_config_file_basename" "$_EXT_CONFIG_PATH"/"$_config_file_targname"
else
2020-04-15 09:33:27 +07:00
echo "$_EXT_CONFIG_PATH/$_config_file_targname already exists. Skipping..."
fi
}
_external_cfg() {
# dxvk-tools
if [ "$dxvk_tools" == "true" ]; then
_config_file_path=dxvk-tools
_config_file_basename=updxvk.cfg
_config_file_targname=updxvk.cfg
unset dxvk_tools
_cfg_loop
fi
# gamescope
if [ "$gamescope" == "true" ]; then
_config_file_path=gamescope-git
_config_file_basename=customization.cfg
_config_file_targname=gamescope-git.cfg
unset gamescope
_cfg_loop
fi
TkgThingy: Update for linux-tkg refactoring Fixes https://github.com/Tk-Glitch/PKGBUILDS/issues/584 Sync > community-patches: Introduce linux59-tkg patches > linux-tkg: Add back #62 Add initial -rc support to the install.sh script. (#100) > linux-tkg: linux59-tkg: Add bluetooth fix for https://bugzilla.kernel.org/show_bug.cgi?id=209745 > linux-tkg: linux59-tkg: Update bcachefs patchset > linux-tkg: Move back to using nproc +1 for _force_all_threads instead of nproc *2. The 5.6 issue was fixed a while ago and really slow CPUs can choke on *2 while doing interactive tasks. > linux-tkg: Fix profiles path > linux-tkg: Update readme > linux-tkg: Adjust community-patches path for the new unified-builder path > linux-tkg: Move to unified builder as default > linux-tkg: unified-builder: Update readme > linux-tkg: unified-builder: Minor adjustments > linux-tkg: unified builder: Add LTS and RC to the version selector > linux-tkg: unified-builder: linux59/510-tkg: Update prjc patchset to v5.9-r1 + hotfix https://gitlab.com/alfredchen/linux-prjc/-/commit/c6e352a26de8e46f5737fed2b876516df82adad1 > linux-tkg: unified builder: Small maintenance-friendly tweaks and added support for 5.10rc1 > linux-tkg: cosmetics in localversion if using llvm (#95) > linux-tkg: linux59/510-tkg: Fix compilation with MuQSS on Debian-based distros > linux-tkg: Update readmes > linux-tkg: linux510-rc-tkg: Add CONFIG_USER_NS_UNPRIVILEGED to defconfig > nvidia-all: Add initial kernel 5.10 support patch > wine-tkg-git: Require staging for proton-rawinput-nofshack checks
2020-10-27 12:47:47 +07:00
# linux-tkg
if [ "$linux_tkg" == "true" ]; then
_config_file_path=linux-tkg
_config_file_basename=customization.cfg
TkgThingy: Update for linux-tkg refactoring Fixes https://github.com/Tk-Glitch/PKGBUILDS/issues/584 Sync > community-patches: Introduce linux59-tkg patches > linux-tkg: Add back #62 Add initial -rc support to the install.sh script. (#100) > linux-tkg: linux59-tkg: Add bluetooth fix for https://bugzilla.kernel.org/show_bug.cgi?id=209745 > linux-tkg: linux59-tkg: Update bcachefs patchset > linux-tkg: Move back to using nproc +1 for _force_all_threads instead of nproc *2. The 5.6 issue was fixed a while ago and really slow CPUs can choke on *2 while doing interactive tasks. > linux-tkg: Fix profiles path > linux-tkg: Update readme > linux-tkg: Adjust community-patches path for the new unified-builder path > linux-tkg: Move to unified builder as default > linux-tkg: unified-builder: Update readme > linux-tkg: unified-builder: Minor adjustments > linux-tkg: unified builder: Add LTS and RC to the version selector > linux-tkg: unified-builder: linux59/510-tkg: Update prjc patchset to v5.9-r1 + hotfix https://gitlab.com/alfredchen/linux-prjc/-/commit/c6e352a26de8e46f5737fed2b876516df82adad1 > linux-tkg: unified builder: Small maintenance-friendly tweaks and added support for 5.10rc1 > linux-tkg: cosmetics in localversion if using llvm (#95) > linux-tkg: linux59/510-tkg: Fix compilation with MuQSS on Debian-based distros > linux-tkg: Update readmes > linux-tkg: linux510-rc-tkg: Add CONFIG_USER_NS_UNPRIVILEGED to defconfig > nvidia-all: Add initial kernel 5.10 support patch > wine-tkg-git: Require staging for proton-rawinput-nofshack checks
2020-10-27 12:47:47 +07:00
_config_file_targname=linux-tkg.cfg
unset linux_tkg
_cfg_loop
fi
# mesa-git
if [ "$mesa_git" == "true" ]; then
_config_file_path=mesa-git
_config_file_basename=customization.cfg
_config_file_targname=mesa-git.cfg
unset mesa_git
_cfg_loop
fi
# mostlyportable-gcc
if [ "$mostlyportable_gcc" == "true" ]; then
_config_file_path=mostlyportable-gcc
_config_file_basename=mostlyportable-gcc.cfg
_config_file_targname=mostlyportable-gcc.cfg
unset mostlyportable_gcc
_cfg_loop
fi
# mostlyportable-mingw
if [ "$mostlyportable_mingw" == "true" ]; then
_config_file_path=mostlyportable-gcc
_config_file_basename=mostlyportable-mingw.cfg
_config_file_targname=mostlyportable-mingw.cfg
unset mostlyportable_mingw
_cfg_loop
fi
# nvidia-all
if [ "$nvidia_all" == "true" ]; then
_config_file_path=nvidia-all
_config_file_basename=customization.cfg
_config_file_targname=nvidia-all.cfg
unset nvidia_all
_cfg_loop
fi
# vkd3d-git
if [ "$vkd3d_git" == "true" ]; then
_config_file_path=vkd3d-git
_config_file_basename=customization.cfg
_config_file_targname=vkd3d-git.cfg
unset vkd3d_git
_cfg_loop
fi
# proton-tkg
if [ "$proton_tkg" == "true" ]; then
_config_file_path=wine-tkg-git/proton-tkg/proton-tkg-profiles
_config_file_basename=sample-external-config.cfg
_config_file_targname=proton-tkg.cfg
unset proton_tkg
_cfg_loop
fi
# wine-tkg
if [ "$wine_tkg" == "true" ]; then
_config_file_path=wine-tkg-git/wine-tkg-git/wine-tkg-profiles
_config_file_basename=sample-external-config.cfg
_config_file_targname=wine-tkg.cfg
unset wine_tkg
_cfg_loop
fi
}
_main_loop() {
echo -e "What do you want to do?"
read -rp "`echo $' > 1.Create missing external config files\n 2.Update submodules\n 3.Reset & update submodules (for conflict fixing - ! will wipe any change vs remote !)\n 4.Exit\nchoice[1-4?]: '`" _choice;
if [ "$_choice" == "2" ]; then
#git submodule update --remote
for _tkg_tools in */; do
if [ "$_tkg_tools" != ".git" ]; then
( cd "$_tkg_tools" && git config pull.rebase false && git checkout master && git pull origin master )
fi
done
elif [ "$_choice" == "3" ]; then
for _tkg_tools in */; do
if [ "$_tkg_tools" != ".git" ]; then
( cd "$_tkg_tools" && git config pull.rebase false && git reset --hard && git checkout master && git pull origin master )
fi
done
elif [ "$_choice" == "4" ]; then
exit 0
else
mkdir -p "$_EXT_CONFIG_PATH"
echo -e "\nPlease select which tool you want to create external config files for (or all of them with option #1) :"
TkgThingy: Update for linux-tkg refactoring Fixes https://github.com/Tk-Glitch/PKGBUILDS/issues/584 Sync > community-patches: Introduce linux59-tkg patches > linux-tkg: Add back #62 Add initial -rc support to the install.sh script. (#100) > linux-tkg: linux59-tkg: Add bluetooth fix for https://bugzilla.kernel.org/show_bug.cgi?id=209745 > linux-tkg: linux59-tkg: Update bcachefs patchset > linux-tkg: Move back to using nproc +1 for _force_all_threads instead of nproc *2. The 5.6 issue was fixed a while ago and really slow CPUs can choke on *2 while doing interactive tasks. > linux-tkg: Fix profiles path > linux-tkg: Update readme > linux-tkg: Adjust community-patches path for the new unified-builder path > linux-tkg: Move to unified builder as default > linux-tkg: unified-builder: Update readme > linux-tkg: unified-builder: Minor adjustments > linux-tkg: unified builder: Add LTS and RC to the version selector > linux-tkg: unified-builder: linux59/510-tkg: Update prjc patchset to v5.9-r1 + hotfix https://gitlab.com/alfredchen/linux-prjc/-/commit/c6e352a26de8e46f5737fed2b876516df82adad1 > linux-tkg: unified builder: Small maintenance-friendly tweaks and added support for 5.10rc1 > linux-tkg: cosmetics in localversion if using llvm (#95) > linux-tkg: linux59/510-tkg: Fix compilation with MuQSS on Debian-based distros > linux-tkg: Update readmes > linux-tkg: linux510-rc-tkg: Add CONFIG_USER_NS_UNPRIVILEGED to defconfig > nvidia-all: Add initial kernel 5.10 support patch > wine-tkg-git: Require staging for proton-rawinput-nofshack checks
2020-10-27 12:47:47 +07:00
select tkg_tools in "all" "dxvk_tools" "gamescope" "linux_tkg" "mesa_git" "mostlyportable_gcc" "mostlyportable_mingw" "nvidia_all" "vkd3d_git" "proton_tkg" "wine_tkg"
do
case $tkg_tools in
"all")
dxvk_tools="true"
gamescope="true"
TkgThingy: Update for linux-tkg refactoring Fixes https://github.com/Tk-Glitch/PKGBUILDS/issues/584 Sync > community-patches: Introduce linux59-tkg patches > linux-tkg: Add back #62 Add initial -rc support to the install.sh script. (#100) > linux-tkg: linux59-tkg: Add bluetooth fix for https://bugzilla.kernel.org/show_bug.cgi?id=209745 > linux-tkg: linux59-tkg: Update bcachefs patchset > linux-tkg: Move back to using nproc +1 for _force_all_threads instead of nproc *2. The 5.6 issue was fixed a while ago and really slow CPUs can choke on *2 while doing interactive tasks. > linux-tkg: Fix profiles path > linux-tkg: Update readme > linux-tkg: Adjust community-patches path for the new unified-builder path > linux-tkg: Move to unified builder as default > linux-tkg: unified-builder: Update readme > linux-tkg: unified-builder: Minor adjustments > linux-tkg: unified builder: Add LTS and RC to the version selector > linux-tkg: unified-builder: linux59/510-tkg: Update prjc patchset to v5.9-r1 + hotfix https://gitlab.com/alfredchen/linux-prjc/-/commit/c6e352a26de8e46f5737fed2b876516df82adad1 > linux-tkg: unified builder: Small maintenance-friendly tweaks and added support for 5.10rc1 > linux-tkg: cosmetics in localversion if using llvm (#95) > linux-tkg: linux59/510-tkg: Fix compilation with MuQSS on Debian-based distros > linux-tkg: Update readmes > linux-tkg: linux510-rc-tkg: Add CONFIG_USER_NS_UNPRIVILEGED to defconfig > nvidia-all: Add initial kernel 5.10 support patch > wine-tkg-git: Require staging for proton-rawinput-nofshack checks
2020-10-27 12:47:47 +07:00
linux_tkg="true"
mesa_git="true"
mostlyportable_gcc="true"
mostlyportable_mingw="true"
nvidia_all="true"
vkd3d_git="true"
proton_tkg="true"
wine_tkg="true"
;;
"dxvk_tools")
dxvk_tools="true"
;;
"gamescope")
gamescope="true"
;;
TkgThingy: Update for linux-tkg refactoring Fixes https://github.com/Tk-Glitch/PKGBUILDS/issues/584 Sync > community-patches: Introduce linux59-tkg patches > linux-tkg: Add back #62 Add initial -rc support to the install.sh script. (#100) > linux-tkg: linux59-tkg: Add bluetooth fix for https://bugzilla.kernel.org/show_bug.cgi?id=209745 > linux-tkg: linux59-tkg: Update bcachefs patchset > linux-tkg: Move back to using nproc +1 for _force_all_threads instead of nproc *2. The 5.6 issue was fixed a while ago and really slow CPUs can choke on *2 while doing interactive tasks. > linux-tkg: Fix profiles path > linux-tkg: Update readme > linux-tkg: Adjust community-patches path for the new unified-builder path > linux-tkg: Move to unified builder as default > linux-tkg: unified-builder: Update readme > linux-tkg: unified-builder: Minor adjustments > linux-tkg: unified builder: Add LTS and RC to the version selector > linux-tkg: unified-builder: linux59/510-tkg: Update prjc patchset to v5.9-r1 + hotfix https://gitlab.com/alfredchen/linux-prjc/-/commit/c6e352a26de8e46f5737fed2b876516df82adad1 > linux-tkg: unified builder: Small maintenance-friendly tweaks and added support for 5.10rc1 > linux-tkg: cosmetics in localversion if using llvm (#95) > linux-tkg: linux59/510-tkg: Fix compilation with MuQSS on Debian-based distros > linux-tkg: Update readmes > linux-tkg: linux510-rc-tkg: Add CONFIG_USER_NS_UNPRIVILEGED to defconfig > nvidia-all: Add initial kernel 5.10 support patch > wine-tkg-git: Require staging for proton-rawinput-nofshack checks
2020-10-27 12:47:47 +07:00
"linux_tkg")
linux_tkg="true"
;;
"mesa_git")
mesa_git="true"
;;
"mostlyportable_gcc")
mostlyportable_gcc="true"
;;
"mostlyportable_mingw")
mostlyportable_mingw="true"
;;
"nvidia_all")
nvidia_all="true"
;;
"vkd3d_git")
vkd3d_git="true"
;;
"proton_tkg")
proton_tkg="true"
;;
"wine_tkg")
wine_tkg="true"
;;
*)
esac
break
done
echo ""
_external_cfg
echo ""
fi
_main_loop
}
cat << 'EOM'
.---.` `.---.
`/syhhhyso- -osyhhhys/`
.syNMdhNNhss/``.---.``/sshNNhdMNys.
+sdMh.`+MNsssssssssssssssNM+`.hMds+
:syNNdhNNhssssssssssssssshNNhdNNys:
/ssyhhhysssssssssssssssssyhhhyss/
.ossssssssssssssssssssssssssssso.
:sssssssssssssssssssssssssssssssss: TKG tools
/sssssssssssssssssssssssssssssssssss/ Thingy
:sssssssssssssoosssssssoosssssssssssss:
osssssssssssssoosssssssoossssssssssssso
osssssssssssyyyyhhhhhhhyyyyssssssssssso
/yyyyyyhhdmmmmNNNNNNNNNNNmmmmdhhyyyyyy/
smmmNNNNNNNNNNNNNNNNNNNNNNNNNNNNNmmms
/dNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNd/
`:sdNNNNNNNNNNNNNNNNNNNNNNNNNds:`
`-+shdNNNNNNNNNNNNNNNdhs+-`
`.-:///////:-.`
EOM
echo -e "This script can create external configuration files for all -tkg packages and tools supporting the feature.\nAlready existing config files will NOT be overwritten, so you'll want to remove any you'd want regenerated.\n\nIt can also update submodules if needed.\n"
echo -e "Current external config path is set to $_EXT_CONFIG_PATH \n"
_main_loop