I am writng a script in which there is an installation file.The installer runs good. But after the installer command there are some files and commands which are based on those installed files. Now problem is the commands get executed before the installer is totally installed. So is there any command which stops the execution other commands untill the installer is completely done.
suppose installer is ./runinstaller -silent
cp /root/user/(installed file)
problem is installed file is executed before run installer is completely installed
error :cant find the file
Probably that install script runs some other scripts or processes in the background and it is not waiting for them to finish. You can use this line of code to halt your script until the file apears (but it may not be copied completely, so add some sleep timeout after that).
while :; do if [ -f ~/test ]; then break; fi; done