mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
- split workflows into separate files to trigger by path this should help out documentation and boards / eboot / pkg files updates, since those *wont* trigger usual build stuff anymore - build*.sh whatever merged into just common.sh and build.sh trigger different parity builds, mod % rem and allow to set .ino list through the environment variable - removes unnecessary temporary files, try to use more pipes move remaining ones into cache dir instead of PWD - remove legacy TRAVIS env vars, use ESP8266_ARDUINO prefix for config - remove Windows path workarounds - hardware/ and ide/ directories are set through envionment do not force specific paths, simplify builds on local machine - sketch list is set through environment. expicit paths for Windows and macOS builders. platformio also gets a real shuffled list instead of mod and rem magic numbers - detect root of the repo through git cli, not base{name,dir} or relative paths
27 lines
810 B
Bash
Executable File
27 lines
810 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -ev
|
|
|
|
root=$(git rev-parse --show-toplevel)
|
|
|
|
fail=0
|
|
for i in $(cat "$root/package/package_esp8266com_index.template.json" | jq '.packages[0]."tools" | .[] | .systems[] | "\(.url) \(.checksum)"' | sort -u | sed 's/ /@/'); do
|
|
url=$(echo $i | sed 's/@/ /' | cut -f2 -d\" | cut -f1 -d' ')
|
|
sha=$(echo $i | sed 's/@/ /' | cut -f2 -d\" | cut -f2 -d' ' | cut -f2 -d:)
|
|
echo "INFO: Checking $url"
|
|
rm -f file.bin
|
|
wget --quiet -O file.bin $url
|
|
calc=$(sha256sum file.bin | cut -f1 -d" ")
|
|
if [ "$sha" != "$calc" ]; then
|
|
echo "ERROR: Download failed or SHA mismatch for $url"
|
|
echo "ERROR: Expected $sha"
|
|
echo "ERROR: Received $calc"
|
|
fail=1
|
|
fi
|
|
done
|
|
|
|
if [ $fail -ne 0 ]; then
|
|
echo ERROR: Package file integrity check failed
|
|
exit 1
|
|
fi
|