diff --git a/customization.cfg b/customization.cfg index 6e89dc8..23351af 100644 --- a/customization.cfg +++ b/customization.cfg @@ -57,6 +57,10 @@ _diffconfig_name="" # [install.sh specific] Use tmpfs as a work directory, recommended when RAM >= 32GB to reduce HDD/SSD usage. For more information, see https://wiki.archlinux.org/title/Tmpfs _use_tmpfs="false" +# Always make a fresh clone of the source in tmpfs to speed up compilation times +# ! This will take ~20GB of RAM by itself, so don't use on <32GB RAM systems ! +_source_in_tmpfs="false" + # [install.sh specific] tmpfs folder path, only used when _use_tmpfs="true". # Creates a linux-tkg work folder within that pathmake sure to have nothing important in "$_tmpfs_path/linux-tkg" _tmpfs_path="/tmp" diff --git a/linux-tkg-config/prepare b/linux-tkg-config/prepare index 9a355d4..8b94c9f 100644 --- a/linux-tkg-config/prepare +++ b/linux-tkg-config/prepare @@ -390,9 +390,14 @@ _linux_git_branch_checkout() { cd "$_where" - if ! [ -d linux-src-git ]; then + if ! [ -d linux-src-git ] || [ "$_source_in_tmpfs" = "true" ]; then msg2 "First initialization of the linux source code git folder" - mkdir linux-src-git + if [ "$_source_in_tmpfs" = "true" ]; then + rm -rf "/tmp/linux-src-git" && mkdir "/tmp/linux-src-git" + ln -s "/tmp/linux-src-git" "${_where}" + else + mkdir linux-src-git + fi cd linux-src-git git init