blob: ed8dbdc80b7d48d8e652d3fd8f79a119587d40b1 (
plain) (
tree)
|
|
#!/usr/bin/env bash
# skip if we not in docker
if [[ "$RUNFROMSHELL" != "" ]]; then
echo "Running from shell. Skipping $*"
exit 0
fi
n=0
while true; do
$*
if [ "$?" == 0 ]; then
exit 0
fi
if [[ $n -ge 10 ]]; then
exit -1
fi
sleep 5s
n=$((n+1))
done
|