I'm writing a script to deploy a project to multiple servers (9 and counting). With compression, copying, and remote connections, the script is rapidly becoming fairly slow. So now I'm investigating having the script trigger a helper run via screen. The ideal workflow in pseudocode is as follows:
deployment script accept user input for deployment parameters echo "deployment initiated" TTY=`tty` start helper 1 in detached screen, dumped to a temp file exit helper 1 export from SVN compress files upload to temporary directory on live servers swap old and new web directories on live servers * start helper 2 in $TTY exit helper 2 echo "deployment done" echo "do you want to view deployment log? [y/N]" take user input if yes output temp file delete temp file exit
Everything is simple enough except for the command marked with a *. I can pipe a static message to
write $TTY, but to take user input I would need to execute a shell script from outside the terminal in which it is to be displayed. Is there any way to do this?
(I'm running CentOS on the dev server, by the way.)