Add an option to clone the source in tmpfs everytime instead of using the root PKGBUILD dir. This effectively brings back a similar approach to makepkg in the way of handling git sources.
It'll require ~20GB of space by itself, so if your tmpfs is in RAM, make sure you have enough free, and it's definitely not recommended to use this on a <32GB RAM machine.
This commit is contained in:
@@ -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
|
# [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"
|
_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".
|
# [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"
|
# Creates a linux-tkg work folder within that pathmake sure to have nothing important in "$_tmpfs_path/linux-tkg"
|
||||||
_tmpfs_path="/tmp"
|
_tmpfs_path="/tmp"
|
||||||
|
@@ -390,9 +390,14 @@ _linux_git_branch_checkout() {
|
|||||||
|
|
||||||
cd "$_where"
|
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"
|
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
|
cd linux-src-git
|
||||||
git init
|
git init
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user