blob: 4c41e4ea3c0962080c1fd26baa5dceeea9390a4f [file] [log] [blame]
#!/bin/bash
# Copyright 2018 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#### CATEGORY=Device management
### wait for a shell to become available
## usage: fx wait
##
## Attempts to SSH to the target repeatedly until the target becomes
## available.
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"/lib/vars.sh || exit $?
until fx-command-run shell exit 2>/dev/null; do
sleep 0.1
done