diff --git a/linux-tkg-config/prepare b/linux-tkg-config/prepare index 8b94c9f..954b791 100644 --- a/linux-tkg-config/prepare +++ b/linux-tkg-config/prepare @@ -390,9 +390,10 @@ _linux_git_branch_checkout() { cd "$_where" - if ! [ -d linux-src-git ] || [ "$_source_in_tmpfs" = "true" ]; then + if ! [ -d linux-src-git ] || ( [ "$_source_in_tmpfs" = "true" ] && ! [ -d /tmp/linux-src-git ] ); then msg2 "First initialization of the linux source code git folder" if [ "$_source_in_tmpfs" = "true" ]; then + rm -rf "${_where}/linux-src-git" rm -rf "/tmp/linux-src-git" && mkdir "/tmp/linux-src-git" ln -s "/tmp/linux-src-git" "${_where}" else @@ -405,6 +406,11 @@ _linux_git_branch_checkout() { git remote add "$remote" "${_kernel_git_remotes[$remote]}" done else + if [ "$_source_in_tmpfs" = "true" ]; then + rm -rf "${_where}/linux-src-git" + ln -s "/tmp/linux-src-git" "${_where}" + fi + cd linux-src-git # Remove "origin" remote if present