I’ve got a command in bitbucket that runs multiple ssh commands, is there a way to run each command once the previous has completed?
ssh <user>@<host> 'cd /<dir>/example.com; git clone https://<user>:<password>@bitbucket.org/<bucket>/examplegit.git -b develop; mv examplegit/* mv examplegit/.* .; rmdir examplegit;'
Cloning into 'examplegit'... mv: cannot stat 'mv': No such file or directory mv: cannot move 'examplegit/.' to './.': Device or resource busy mv: cannot move 'examplegit/..' to './..': Device or resource busy mv: cannot move 'examplegit/.git' to './.git': Directory not empty rmdir: failed to remove 'examplegit': Directory not empty
I can run the same command multiple times and get a different amount and order of errors. Which makes sense, they are all being executed straight away but not always ready to be executed.
Being able to run one after the other would solve all this