pandora/docker/wait-for-file

13 lines
186 B
Text
Raw Normal View History

2019-07-06 16:12:32 +00:00
#!/bin/sh
2020-09-27 15:53:37 +00:00
TIMEOUT=180
2019-07-06 16:12:32 +00:00
TARGET="$1"
for i in `seq $TIMEOUT` ; do
if [ -e "$TARGET" ]; then
exit 0
fi
sleep 1
done
echo "Giving up waiting for file $TARGET" >&2
exit 1