From db82239f8d913dd640228f4366e0788127a2e595 Mon Sep 17 00:00:00 2001 From: Andrew Scheller Date: Fri, 6 Sep 2024 16:14:28 +0100 Subject: [PATCH] Add a LINUX_REPO_URI variable --- rpi-update | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rpi-update b/rpi-update index 37c1f1a..d901382 100755 --- a/rpi-update +++ b/rpi-update @@ -19,6 +19,9 @@ BOOTLOADER_REPO_URI=${BOOTLOADER_REPO_URI:-"https://github.com/raspberrypi/rpi-e BOOTLOADER_REPO_API_URI=${BOOTLOADER_REPO_URI/github.com/api.github.com\/repos} BOOTLOADER_REPO_CONTENT_URI=${BOOTLOADER_REPO_URI/github.com/raw.githubusercontent.com} +LINUX_REPO_URI=${LINUX_REPO_URI:-"https://github.com/raspberrypi/linux"} +LINUX_REPO_API_URI=${LINUX_REPO_URI/github.com/api.github.com\/repos} + UPDATE_SELF=${UPDATE_SELF:-1} UPDATE_REPO_URI="https://github.com/raspberrypi/rpi-update" UPDATE_REPO_CONTENT_URI=${UPDATE_REPO_URI/github.com/raw.githubusercontent.com} @@ -766,9 +769,9 @@ if [[ "${FW_REV}" == "" ]]; then fi if [[ "${ARTIFACT}" == pulls/* ]]; then PULL=${ARTIFACT##*/} - ARTIFACT=$(eval curl -s "https://api.github.com/repos/raspberrypi/linux/pulls/${PULL}" | awk '/"sha":/ {gsub(/"/, "", $2); gsub(/,/, "", $2); print $2; exit}') + ARTIFACT=$(eval curl -s "${LINUX_REPO_API_URI}/pulls/${PULL}" | awk '/"sha":/ {gsub(/"/, "", $2); gsub(/,/, "", $2); print $2; exit}') else - ARTIFACT=$(eval curl -s "https://api.github.com/repos/raspberrypi/linux/actions/artifacts?per_page=100" | grep -A1 "\"head_branch\": \"${FW_REV_IN}\"" | awk '/"head_sha":/ {gsub(/"/, "", $2); gsub(/,/, "", $2); print $2; exit}') + ARTIFACT=$(eval curl -s "${LINUX_REPO_API_URI}/actions/artifacts?per_page=100" | grep -A1 "\"head_branch\": \"${FW_REV_IN}\"" | awk '/"head_sha":/ {gsub(/"/, "", $2); gsub(/,/, "", $2); print $2; exit}') fi else ARTIFACT=${FW_REV_IN}