Skip to content

Commit a12fe76

Browse files
committed
fixup
1 parent be12686 commit a12fe76

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

utils/kernel-upgrade.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)