Skip to content

Instantly share code, notes, and snippets.

@atomicstack
Last active August 29, 2023 22:56
Show Gist options
  • Save atomicstack/9c43e452c4b7cefb37c1e78f65b0b1fa to your computer and use it in GitHub Desktop.
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
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)$"))' )
@atomicstack
Copy link
Author

atomicstack commented Aug 29, 2023

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