16 lines
538 B
Shell
16 lines
538 B
Shell
#!/usr/bin/env bash
|
|
set -Eeuo pipefail
|
|
|
|
source_root=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
|
|
subject=${source_root}/scripts/hololake-release-bridge.sh
|
|
|
|
bash -n "$subject"
|
|
grep -Fq 'start_server' "$subject"
|
|
grep -Fq 'start_tunnel' "$subject"
|
|
grep -Fq 'wait -n "$SERVER_PID" "$TUNNEL_PID"' "$subject"
|
|
grep -Fq 'kill -0 "$SERVER_PID"' "$subject"
|
|
if grep -Fq 'for pid in "${CHILDREN[@]}' "$subject"; then
|
|
echo 'tunnel failure must not kill the healthy local release server' >&2
|
|
exit 1
|
|
fi
|
|
echo HOLOLAKE_RELEASE_BRIDGE_LIFECYCLE_OK
|