mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 10:21:52 +00:00
* refactor project structure * environment-based default registry * fix tests * update build container * use docker platform for iso build emulation * simplify compat * Fix docker platform spec in run-compat.sh * handle riscv compat * fix bug with dep error exists attr * undo removal of sorting * use qemu for iso stage --------- Co-authored-by: Mariusz Kogen <k0gen@pm.me> Co-authored-by: Matt Hill <mattnine@protonmail.com>
30 lines
713 B
Bash
Executable File
30 lines
713 B
Bash
Executable File
#!/bin/bash
|
|
|
|
cd "$(dirname "${BASH_SOURCE[0]}")"
|
|
|
|
set -e
|
|
|
|
PLATFORM=$1
|
|
|
|
if [ -z "$PLATFORM" ]; then
|
|
>&2 echo "usage: $0 <PLATFORM>"
|
|
exit 1
|
|
fi
|
|
|
|
rm -rf ./lib/firmware/$PLATFORM
|
|
mkdir -p ./lib/firmware/$PLATFORM
|
|
|
|
cd ./lib/firmware/$PLATFORM
|
|
|
|
firmwares=()
|
|
while IFS= read -r line; do firmwares+=("$line"); done < <(jq -c ".[] | select(.platform[] | contains(\"$PLATFORM\"))" ../../firmware.json)
|
|
for firmware in "${firmwares[@]}"; do
|
|
if [ -n "$firmware" ]; then
|
|
id=$(echo "$firmware" | jq --raw-output '.id')
|
|
url=$(echo "$firmware" | jq --raw-output '.url')
|
|
shasum=$(echo "$firmware" | jq --raw-output '.shasum')
|
|
curl --fail -L -o "${id}.rom.gz" "$url"
|
|
echo "$shasum ${id}.rom.gz" | sha256sum -c
|
|
fi
|
|
done
|