1
0
Fork 0
site-deployer/build-when-ready.sh

14 lines
271 B
Bash
Executable file

#!/bin/bash
set -eu
failcount=0
until curl -X "GET" 'https://gitea.jotoho.de/api/v1/version' >/dev/null 2>&1; do
if [ "$failcount" -gt 300 ]; then
echo "Gitea timeout. Exiting!"
exit 1
fi
sleep 1
failcount=$(($failcount + 1))
done
sh $1