From 7776bc4f83f6272d1728cc8deeda980a532cddff Mon Sep 17 00:00:00 2001 From: Leonid Lapshin Date: Thu, 22 Oct 2020 14:44:40 +0300 Subject: [PATCH] removed timeout --- images/macos/provision/configuration/finalize-vm.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/images/macos/provision/configuration/finalize-vm.sh b/images/macos/provision/configuration/finalize-vm.sh index b2e831c84..236fb5265 100644 --- a/images/macos/provision/configuration/finalize-vm.sh +++ b/images/macos/provision/configuration/finalize-vm.sh @@ -22,4 +22,10 @@ rm -rf ~/utils ~/image-generation # Erase all indexes and wait until the rebuilding process ends, # for now there is no way to get status of indexing process, it takes around 3 minutes to accomplish sudo mdutil -E / -sleep 180 \ No newline at end of file + +sudo log stream | while true; do + if read -rt5 && [[ $REPLY =~ "executeQuery with success=0" ]]; then + echo "indexing completed" + exit 0 + fi +done \ No newline at end of file