I have a sequential script in which there is a git clone. I would like to make sure that the actual git process is finished before executing the next step. I tried
Code:
git clone https://github.example.com/Sample/Example.git & export PID=${!} | while [[ ( -d /proc/$PID ) && ( -z `grep zombie /proc/$PID/status` ) ]]; do sleep 1; done
and various other ways but could not manage how to wait until the actual git clone is done. Any hint on this one please?