Handle existing source dir in tmpfs - That's actually safe to do thanks to @AdelKS 's fine work.
Following 348f3c9bb6
This commit is contained in:
@@ -390,9 +390,10 @@ _linux_git_branch_checkout() {
|
|||||||
|
|
||||||
cd "$_where"
|
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"
|
msg2 "First initialization of the linux source code git folder"
|
||||||
if [ "$_source_in_tmpfs" = "true" ]; then
|
if [ "$_source_in_tmpfs" = "true" ]; then
|
||||||
|
rm -rf "${_where}/linux-src-git"
|
||||||
rm -rf "/tmp/linux-src-git" && mkdir "/tmp/linux-src-git"
|
rm -rf "/tmp/linux-src-git" && mkdir "/tmp/linux-src-git"
|
||||||
ln -s "/tmp/linux-src-git" "${_where}"
|
ln -s "/tmp/linux-src-git" "${_where}"
|
||||||
else
|
else
|
||||||
@@ -405,6 +406,11 @@ _linux_git_branch_checkout() {
|
|||||||
git remote add "$remote" "${_kernel_git_remotes[$remote]}"
|
git remote add "$remote" "${_kernel_git_remotes[$remote]}"
|
||||||
done
|
done
|
||||||
else
|
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
|
cd linux-src-git
|
||||||
|
|
||||||
# Remove "origin" remote if present
|
# Remove "origin" remote if present
|
||||||
|
Reference in New Issue
Block a user