Wanted - push/rexec/pull script for remote program builds

J

John Ramsden

I have various ActiveState Perl scripts that run on Windows, Linux,
and Solaris, and soon AIX and possibly others. These must be compiled
using the PDK on each platform to produce a runfile specific to that
platform.

Each time I amend the source I must manually FTP the updated file
to a couple of remote systems, compile it on each of these these,
and FTP the resulting runfiles back to the development system.

Obviously this is very tedious and error prone, and will become more
so the more platforms are involved. So I'd very much like to start
using a simple script that would automate the process.

This wouldn't take me too long to write, but not wanting to reinvent
the wheel I wondered if anyone had or knew of a suitable script that
was already available, preferably in Perl.

It needn't be an all singing and dancing system; in fact I'd rather it
wasn't - All I need is the ability to push a configurable set of files
to a configurable remote directory, rexec a build script there, and
pull back the result as binary files.

Many thanks in anticipation.


Cheers

John Ramsden ([email protected])
 
J

Joe Smith

Each time I amend the source I must manually FTP the updated file


rsync -auv -e ssh work_dir/ remotehost:work_dir/
to a couple of remote systems, compile it on each of these these,

ssh remotehost 'cd work_dir; make'
and FTP the resulting runfiles back to the development system.

rsync -auv -e ssh remotehost:work_dir/ work_dir/

I've done the above where the local machine was Windows-98 with Cygwin
(http://www.cygwin.com/) installed and the remote host was Solaris.
You can use .ssh/authorized_keys to avoid the password prompt.
It needn't be an all singing and dancing system; in fact I'd rather it
wasn't - All I need is the ability to push a configurable set of files
to a configurable remote directory, rexec a build script there, and
pull back the result as binary files.


The above three commands can be put into a bash shell script.

-Joe
 
J

John Ramsden

Each time I amend the source I must manually FTP the updated file


rsync -auv -e ssh work_dir/ remotehost:work_dir/
to a couple of remote systems, compile it on each of these these,

ssh remotehost 'cd work_dir; make'
and FTP the resulting runfiles back to the development system.

rsync -auv -e ssh remotehost:work_dir/ work_dir/


Many thanks for your reply Joe. The only thing I couldn't find,
using 'man rsync' and 'man rsyncd.conf', was info on how or if
rsync converts text file line endings when transferring files
between Windows (or Mac OS) and Unix.

Mind you, if it copies all files verbatim, I can work round this
by using on the target Unix system a script that runs unix2dos
or equivalent on text files before building the run files from
them.

In any case, these days most compilers and suchlike, including
hopefully ActiveState perlapp, are fairly forgiving about dodgy
line endings; so maybe I can just leave the Windows text files
unchanged.

Apologies this has drifted away from Perl.



Cheers

John R Ramsden ([email protected])
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top