File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -57,10 +57,18 @@ check_directories() {
5757
5858 if [ ! -d " $LINUX_DIR " ]; then
5959 log_info " Linux directory '$LINUX_DIR ' not found, cloning..."
60- # Use HTTPS URL for cloning (git URL rewrite will handle remotes later)
61- CLONE_URL=" https://github.com/kernelkit/linux.git"
62- if git clone " $CLONE_URL " " $LINUX_DIR " ; then
60+ # Clone to parent directory if LINUX_DIR is a relative path without slashes
61+ if [[ " $LINUX_DIR " != * /* ]]; then
62+ CLONE_TARGET=" ../$LINUX_DIR "
63+ log_info " Cloning to $CLONE_TARGET (parent directory)"
64+ else
65+ CLONE_TARGET=" $LINUX_DIR "
66+ fi
67+
68+ if git clone " $KKIT_URL " " $CLONE_TARGET " ; then
6369 log_info " Successfully cloned linux repository"
70+ # Update LINUX_DIR to the actual path
71+ LINUX_DIR=" $CLONE_TARGET "
6472 else
6573 log_error " Failed to clone linux repository"
6674 exit 1
You can’t perform that action at this time.
0 commit comments