Last active
August 29, 2023 22:56
-
-
Save atomicstack/9c43e452c4b7cefb37c1e78f65b0b1fa to your computer and use it in GitHub Desktop.
a one-liner to fetch the latest revisions of /boot/*.{elf,dat} in the RPi firmware repository (because it's a 14GB repo and cloning takes forever, and we're only interested in ~20MB of data). requires the command line utils wget and jq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget --base=https://github.com/raspberrypi/firmware/raw/master/ -i <( wget -qO - https://github.com/raspberrypi/firmware/tree/master/boot | jq -r '.payload.tree.items[].path | select(test("(elf|dat)$"))' ) |
Looks like GitHub now returns JSON where it previously returned HTML. I've added a new revision that uses wget
+jq
to extract the relevant URLs.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This no longer works, and generates errors such as:
.......
,"/raspberrypi/firmware/branches/fetch_and_merge/master?discard_changes=true":{"post":"-KuOtqs9-1Xg9xIcG2zce2hhhkuZUIX81if433BCOtsbDbgri0DKxt8GkgE7WaH64FPNOZsXc0JmBW6lSx3S5g"}}},"title":"firmware/boot: Bad port number.
--2023-08-29 16:33:55-- http://at/
Resolving at (at)... failed: No such host is known. .
wget: unable to resolve host address 'at'
--2023-08-29 16:33:57-- http://master/
Resolving master (master)... failed: No such host is known. .
wget: unable to resolve host address 'master'
--2023-08-29 16:34:00-- http://xn--uba/
Resolving xn--uba (xn--uba)... failed: No such host is known. .
wget: unable to resolve host address 'xn--uba'
--2023-08-29 16:34:03-- http://raspberrypi/firmware%22%7D
Resolving raspberrypi (raspberrypi)... failed: No such host is known. .
wget: unable to resolve host address 'raspberrypi'
Any chance you could provide a quick fix? Would hate to download that 14GB repo! Thank you