From 1bde6bb3c4b5433e7744521df775b69ae62ccc40 Mon Sep 17 00:00:00 2001 From: Riku Viitanen Date: Fri, 8 Sep 2023 01:03:32 +0300 Subject: Support multiple dependencies per project Signed-off-by: Riku Viitanen --- config/git/revisions | 2 +- script/update/project/repo | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/config/git/revisions b/config/git/revisions index df73647c..753a3c4c 100644 --- a/config/git/revisions +++ b/config/git/revisions @@ -80,7 +80,6 @@ rev: 6a7db34ff63345a7badec79ebea3aaef1712f374 loc: util-fw/pico-sdk url: https://github.com/raspberrypi/pico-sdk - depend: rpi-pico-tinyusb } {rpi-pico-tinyusb}{ @@ -95,4 +94,5 @@ url: https://codeberg.org/libreboot/pico-serprog bkup_url: https://notabug.org/libreboot/pico-serprog depend: rpi-pico-sdk + depend: rpi-pico-tinyusb } diff --git a/script/update/project/repo b/script/update/project/repo index a5e8ef62..0183bf43 100755 --- a/script/update/project/repo +++ b/script/update/project/repo @@ -33,8 +33,10 @@ main() verify_config clone_project - [ "${depend}" = "" ] || ./update project repo ${depend} || \ - fail "Cannot fetch dependency, ${depend}, for project, ${name}" + [ "${depend}" = "" ] || for d in ${depend} ; do + ./update project repo ${d} || \ + fail "Cannot fetch dependency, ${d}, for project, ${name}" + done rm -Rf "${tmp_dir}" || fail "cannot remove tmpdir, ${tmp_dir}" } @@ -54,7 +56,7 @@ read_config() bkup_url:*) bkup_url=${2} ;; depend:*) - depend=${2} ;; + depend="${depend} ${2} " ;; esac done << EOF $(eval "awk '${awkstr}' config/git/revisions") -- cgit v1.2.1