pandora/docker/wait-for-file
2020-09-27 17:53:37 +02:00

12 lines
186 B
Bash
Executable file

#!/bin/sh
TIMEOUT=180
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