diff --git a/contrib/teamcity/ibd.sh b/contrib/teamcity/ibd.sh --- a/contrib/teamcity/ibd.sh +++ b/contrib/teamcity/ibd.sh @@ -13,7 +13,8 @@ # Setup mkdir -p ibd -touch ibd/debug.log +DEBUG_LOG="ibd/debug.log" +touch "${DEBUG_LOG}" chmod +x bitcoind # Launch bitcoind using this script's parameters @@ -27,14 +28,14 @@ trap "cleanup" EXIT # Show some progress -tail -f ibd/debug.log | grep 'UpdateTip' | awk 'NR % 10000 == 0' & +tail -f "${DEBUG_LOG}" | grep 'UpdateTip' | awk 'NR % 10000 == 0' & # Wait for IBD to finish and kill the daemon ( ( # Ignore the broken pipe when tail tries to write pipe closed by grep set +o pipefail - tail -f ibd/debug.log | grep -m 1 'progress=1.000000' + tail -f "${DEBUG_LOG}" | grep -m 1 'progress=1.000000' ) echo "Initial block download complete."