Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 1 | #! /bin/bash |
2 | |||||
3 | display_usage() { | ||||
4 | echo -e "\nUsage:\n$0 [fn] \n" | ||||
5 | } | ||||
6 | |||||
7 | if [ $# -lt 1 ] | ||||
8 | then | ||||
9 | display_usage | ||||
10 | exit 1 | ||||
11 | fi | ||||
12 | |||||
13 | echo "Waiting for XOS to create file $1" | ||||
14 | |||||
15 | until find $1 &> /dev/null | ||||
16 | do | ||||
17 | sleep 1 | ||||
18 | echo -ne "." | ||||
19 | RUNNING_CONTAINER=`sudo docker ps|grep "xos"|awk '{print $$NF}'` | ||||
20 | if [[ $RUNNING_CONTAINER == "" ]]; then | ||||
21 | echo Container may have failed. check with \"make showlogs\' | ||||
22 | exit 1 | ||||
23 | fi | ||||
24 | done | ||||
25 | echo "XOS is ready" |