From cf2c35b114f14b0c0bcfbbf9be2a040250569da5 Mon Sep 17 00:00:00 2001 From: bryan Date: Wed, 6 Aug 2025 21:01:08 -0400 Subject: [PATCH] Specify fork with cherrypick --- openwrtbuilder | 14 +++++++++++--- profiles | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/openwrtbuilder b/openwrtbuilder index 5903427..6526bac 100755 --- a/openwrtbuilder +++ b/openwrtbuilder @@ -537,11 +537,19 @@ from_source() { execute git -C "$SRC_DIR" worktree add --detach "$BUILD_DIR" "$ref" # Add cherrypick commits if specified in profile - for commit in ${P_ARR[cherrypicks]}; do - echo "Cherry-picking $commit" + for entry in ${P_ARR[cherrypicks]}; do + remote="${entry%%:*}" + commit="${entry##*:}" + # Add remote if not present + if ! git -C "$BUILD_DIR" remote | grep -q "^$remote$"; then + execute git -C "$BUILD_DIR" remote add "$remote" "https://github.com/$remote/openwrt.git" + fi + # Fetch remote + execute git -C "$BUILD_DIR" fetch "$remote" + # Cherry-pick commit execute git -C "$BUILD_DIR" cherry-pick "$commit" done - + # Print commit info commit=$(git -C "$BUILD_DIR" rev-parse HEAD) description=$(git -C "$BUILD_DIR" describe) diff --git a/profiles b/profiles index 772e776..208fff6 100644 --- a/profiles +++ b/profiles @@ -22,7 +22,7 @@ declare -Ag r4s=( CONFIG_TARGET_ROOTFS_PARTSIZE=512 CONFIG_TARGET_KERNEL_PARTSIZE=32 \ CONFIG_BUILDBOT=n" [files]="/mnt/backup" - [cherrypicks]="59d6e31 bb251b8" + [cherrypicks]="wurzerj:59d6e31 wurzerj:bb251b8" ) declare -Ag ax6000=(