Squashed 'external/toxcore/c-toxcore/' content from commit 67badf69
git-subtree-dir: external/toxcore/c-toxcore git-subtree-split: 67badf69416a74e74f6d7eb51dd96f37282b8455
This commit is contained in:
24
other/bootstrap_daemon/docker/update-sha256
Executable file
24
other/bootstrap_daemon/docker/update-sha256
Executable file
@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eux
|
||||
|
||||
docker_build() {
|
||||
docker build -f other/bootstrap_daemon/docker/Dockerfile -t toxchat/bootstrap-node .
|
||||
}
|
||||
|
||||
# Run Docker build once. If it succeeds, we're good.
|
||||
if docker_build; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# We're not good. Run it again, but now capture the output.
|
||||
OUTPUT=$(docker_build || true 2>&1)
|
||||
|
||||
if echo "$OUTPUT" | grep '/usr/local/bin/tox-bootstrapd: FAILED'; then
|
||||
# This is a checksum warning, so we need to update it.
|
||||
IMAGE=$(echo "$OUTPUT" | grep '^ ---> [0-9a-f]*$' | grep -o '[0-9a-f]*$' | tail -n1)
|
||||
docker run --rm "$IMAGE" sha256sum /usr/local/bin/tox-bootstrapd >other/bootstrap_daemon/docker/tox-bootstrapd.sha256
|
||||
fi
|
||||
|
||||
# Run once last time to complete the build.
|
||||
docker_build
|
Reference in New Issue
Block a user